Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add java 17 JRE slim image #468

Closed
pjroth opened this issue Sep 28, 2021 · 2 comments
Closed

Add java 17 JRE slim image #468

pjroth opened this issue Sep 28, 2021 · 2 comments
Labels
Request Request for image modification or feature

Comments

@pjroth
Copy link

pjroth commented Sep 28, 2021

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:

# docker images |grep -e 11-jre-slim -e 17-slim
openjdk                  17-slim                   87a856efdb51   10 hours ago    407MB
openjdk                  11-jre-slim               973c18dbf567   16 months ago   204MB

Thank you!

@wglambert wglambert added the Request Request for image modification or feature label Sep 28, 2021
@wglambert
Copy link

See #272
The builds come from https://jdk.java.net/17/ which only offers the JDK

#302 (comment)

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.)

@pjroth
Copy link
Author

pjroth commented Sep 28, 2021

Thanks for the quick answer. Seems like this should be closed then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Request Request for image modification or feature
Projects
None yet
Development

No branches or pull requests

2 participants