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

Reduce overall container size of our ubi images by basing them on ubi-jre. #265

Closed
jdmcclur opened this issue May 20, 2021 · 9 comments
Closed

Comments

@jdmcclur
Copy link
Member

I mentioned this on an an issue for ubi-min, but think this deserves its own issue.

We should look into basing our images on ubi-jre instead of ubi.
Example: adoptopenjdk/openjdk8-openj9:ubi-jre vs adoptopenjdk/openjdk8-openj9:ubi

I think ubi-jre only packages the jre instead of the whole jdk.

For our ubuntu images we use jre images, so I would think we would want to do the same for ubi?
The differences in size is fairly high. Is there a reason customers need the whole jdk for ubi (and not for ubuntu)?

adoptopenjdk/openjdk11-openj9 ubi 590MB
adoptopenjdk/openjdk11-openj9 ubi-jre 376MB

adoptopenjdk/openjdk8-openj9 ubi 479MB
adoptopenjdk/openjdk8-openj9 ubi-jre 378MB

@jdmcclur
Copy link
Member Author

Best case is using ubi-minimal-jre, but then yum (and maybe other things) do not work. I did switch to microdnf and things seemed to build fine.

adoptopenjdk/openjdk8-openj9 ubi-minimal-jre 271MB

@vijaysun-omr
Copy link

@leochr fyi for your thoughts when you have time

@leochr
Copy link
Member

leochr commented May 28, 2021

That is a significant difference in size. We'll definitely use the jre images when adding ubi-min support. As for existing ubi images, not sure if customers actually rely on the jdk (or why jdk images were chosen, perhaps jre images were not available at that time). Now that UBI images are available in Docker Hub, we'll be looking to move the ubi images into the official repo (where Ubuntu images are) and as part of this move, we could switch to jre or drop ubi images altogether and just have ubi-min.

@l3ender
Copy link

l3ender commented Jul 20, 2021

This would be great! We currently use Ubuntu rather than UBI due to the significant reduction in size.

@vijaysun-omr
Copy link

@leochr is the change to use jre planned, and if so, what is the outlook ?

@leochr
Copy link
Member

leochr commented Nov 5, 2021

@vijaysun-omr As customers could rely on the jdk in existing Liberty images, we are planning to create new UBI-based images (ubi-min or ubi-micro) with jre. Some prototype work is expected to start in 4Q. Given other priorities with operators, this would be a late 1Q deliverable.

@verymahler
Copy link

verymahler commented Feb 4, 2022

The UBI-based IBM Semeru Runtimes Docker images with only the JRE are ready
But they may not be smaller than the Ubuntu- and CentOS-based images.

UBI-based

REPOSITORY                          TAG                      IMAGE ID       CREATED     SIZE
icr.io/appcafe/ibm-semeru-runtimes  open-17-jre-ubi-minimal  650474c4ee12   3 days ago  463MB
icr.io/appcafe/ibm-semeru-runtimes  open-17-jre-ubi          78ce492f19b4   3 days ago  449MB
icr.io/appcafe/ibm-semeru-runtimes  open-17-jdk-ubi-minimal  ade240f5abfc   3 days ago  668MB
icr.io/appcafe/ibm-semeru-runtimes  open-17-jdk-ubi          79689371ff92   3 days ago  811MB
icr.io/appcafe/ibm-semeru-runtimes  open-11-jre-ubi-minimal  513ed65f9d55   3 days ago  460MB
icr.io/appcafe/ibm-semeru-runtimes  open-11-jre-ubi          1168262aae12   3 days ago  448MB
icr.io/appcafe/ibm-semeru-runtimes  open-11-jdk-ubi-minimal  c24c31258b0d   3 days ago  658MB
icr.io/appcafe/ibm-semeru-runtimes  open-11-jdk-ubi          c10120ce37b7   3 days ago  802MB
icr.io/appcafe/ibm-semeru-runtimes  open-8-jre-ubi-minimal   dbd4bf4f0af2   3 days ago  446MB
icr.io/appcafe/ibm-semeru-runtimes  open-8-jre-ubi           4f10887f7cee   3 days ago  589MB
icr.io/appcafe/ibm-semeru-runtimes  open-8-jdk-ubi-minimal   3021bfd7052c   3 days ago  547MB
icr.io/appcafe/ibm-semeru-runtimes  open-8-jdk-ubi           83ba8547e2c7   3 days ago  690MB

Ubuntu- and CentOS-based

REPOSITORY                          TAG                      IMAGE ID       CREATED     SIZE
ibm-semeru-runtimes                 open-17-jre-focal        81ab52bced24   2 days ago  276MB
ibm-semeru-runtimes   	            open-17-jdk-focal        269f02602847   2 days ago  482MB
ibm-semeru-runtimes                 open-11-jre-focal        d0881875df9c   2 days ago  275MB
ibm-semeru-runtimes                 open-11-jdk-focal        a06c30509c35   2 days ago  472MB
ibm-semeru-runtimes                 open-8-jre-focal         6fe3368a06df   2 days ago  259MB
ibm-semeru-runtimes                 open-8-jdk-focal         ca7149797dc4   2 days ago  361MB
ibm-semeru-runtimes                 open-17-jre-centos7      de0f6dd98f99   3 days ago  403MB
ibm-semeru-runtimes                 open-17-jdk-centos7      4b459c36f1f5   3 days ago  608MB
ibm-semeru-runtimes                 open-11-jre-centos7      e70e7242c1d7   3 days ago  400MB
ibm-semeru-runtimes                 open-11-jdk-centos7      a5b9af6f8dee   3 days ago  598MB
ibm-semeru-runtimes                 open-8-jre-centos7       d6a846c4fe33   3 days ago  386MB
ibm-semeru-runtimes                 open-8-jdk-centos7       c5c86d0d26f6   3 days ago  486MB

@jdmcclur
Copy link
Member Author

@verymahler - any idea why icr.io/appcafe/ibm-semeru-runtimes:open-8-jre-ubi-minimal (446MB) is so big compared to the adoptopenjdk/openjdk8-openj9:ubi-minimal-jre (271MB) I found before?

@leochr
Copy link
Member

leochr commented Jun 24, 2022

JRE images will be used for ubi-min based images (tracked by #207). Closing.

@leochr leochr closed this as completed Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants