OpenLiberty / ci.docker

Eclipse Public License 1.0
43 stars 59 forks source link

Consider using JRE for UBI based images #388

Closed tjwatson closed 1 year ago

tjwatson commented 1 year ago

Our UBI based images suffer in size when compared to our Ubuntu based images because they are based on JDK semeru images. This makes the kernel-slim image over twice the size for UBI:

docker.io/library/open-liberty kernel-slim-java11-openj9 8eee8faa8faf 2 days ago 311 MB icr.io/appcafe/open-liberty kernel-slim-java11-openj9-ubi d8a82c53047d 2 days ago 646 MB

To make a comparably smaller image for the UBI based images the application developer has to do some pretty complicated things to jlink a smaller JRE. But then they are left not even basing their final application image off our UBI images really. For example: https://github.com/tjwatson/acmeair-monolithic-java/blob/44c44b1dbca1a5bbde0fc6a5ce12e2d714c076af/Dockerfile-base-minimal

I see no advantage to only offering JDK images for deployment. Is there a reason we want the UBI images to be so much larger than the Ubuntu?

leochr commented 1 year ago

@tjwatson we are planning to provide ubi-min + JRE based Liberty images to address the size concerns: https://github.com/OpenLiberty/ci.docker/issues/207

tjwatson commented 1 year ago

@tjwatson we are planning to provide ubi-min + JRE based Liberty images to address the size concerns: #207

Closing this as work will be done in #207