Closed pjroth closed 2 years ago
See https://github.com/docker-library/openjdk/issues/272 The builds come from https://jdk.java.net/17/ which only offers the JDK
https://github.com/docker-library/openjdk/issues/302#issuecomment-482722509
Upstream does not distribute an official JRE package that I am aware of, nor do they have documentation for either what bits from the official downloads should be kept or what bits should be removed to create an official JRE package, so this will not involve that. (Folks wishing to create a JRE based on OpenJDK 12+ are likely better off playing with jlink anyhow to create their own custom minimal JRE via a multi-stage build or similar -- I've personally done so via the existing Oracle Linux image with a multi-stage build copying the resulting minimal JRE into a Debian-based image with great success.)
Thanks for the quick answer. Seems like this should be closed then?
When creating a docker image to run a java program, it is desirable to us that the image is as small as possible. This is to speed up build and launch times mainly. This is especially important when caching is not able to help such as on ephemeral build instances or production execution environments. The build image when we upgraded from 11 to 17 is about twice the size. It would be nice if the image was similar to the 11 image, perhaps by creating a JRE only java 17 image such as
17-jre-slim
. This JRE image is what we used when we were running java 11.11 vs 17 image size comparison:
Thank you!