-
Notifications
You must be signed in to change notification settings - Fork 902
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
improve: use jlink to reduce jdk size in the image #4456
Conversation
Does this only include the JRE, and exclude JDK tools like jmap, etc.? |
No. This image includes the JRE and JDK tools. |
Could you help to review? @dlg99 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am I right that this change will downgrade jdk from 17 to 11 in the docker image?
You are right, I should use jdk 17. |
### Motivation Reference: https://adoptium.net/blog/2021/08/using-jlink-in-dockerfiles Reduce size: 398.23 MB -> 245.23 MB New image:https://hub.docker.com/layers/nodece/bk/4.17.1-jlink/images/sha256-73c8354a981d7dfefcb1247cf84f6c3e91db2342431749e528ba8468c65be1f5?context=explore Old image: https://hub.docker.com/layers/apache/bookkeeper/4.17.1/images/sha256-342f384bc21b4d31d5349f741cf831f3c5bb47dfea34557104528ccd9597810f?context=explore ### Changes - Using jlink to compress the JDK and then copy that to the base image
Motivation
Reference: https://adoptium.net/blog/2021/08/using-jlink-in-dockerfiles
Reduce size: 398.23 MB -> 245.23 MB
New image:https://hub.docker.com/layers/nodece/bk/4.17.1-jlink/images/sha256-73c8354a981d7dfefcb1247cf84f6c3e91db2342431749e528ba8468c65be1f5?context=explore
Old image: https://hub.docker.com/layers/apache/bookkeeper/4.17.1/images/sha256-342f384bc21b4d31d5349f741cf831f3c5bb47dfea34557104528ccd9597810f?context=explore
Changes