infrastructure
infrastructure copied to clipboard
Static docker dockerfile enhancements
While doing some updates for the UBI10 containers I felt a few updates would be in order throughout the dockerfiles:
- Switch up to JDK25 instead of 17 (Maybe do this after 25 GA's next month - although we could move to 21 in the meantime)
- Avoid storing the intermediate JDK download tarball. GPG signature verification can still be performed as per https://fosstodon.org/@sxa/113006634193117351
- Look at whether the same can be done for the ant/ant-contrib downloads
- Only use the JRE, not the full JDK (Seems ok for the openjdk tests, may need to check others)
- Move
perlinstall to the section later down with the other test prerequisites as it's not required for most of the early steps for downloading java, ant etc. - (I'm in two minds about this as it's non-default for the distributions) Add
RUN ln -s /usr/lib/jvm/jdk25/bin/java /usr/bin/java
Anything else that could reduce the size of the image without compromising the AQA requirements? Any such savings would be beneficial for utilising these containers for dynamically provisioned machines as part of https://github.com/adoptium/aqa-tests/issues/5684 Also noting that wile we can't get rid of it, perl seems to account for about 400MB in the full linux AQA images.
Sample AQA container images sizes on x64
Noting that the aqa_ubi10_bloat is the default image which had the jdk17.tar.gz tarball in it (albeit deleted) so the ~200MB saving there is from implementing step 2 in the list.
# docker images | grep aqa_ | sort
aqa_alp314 latest 27566849c3d7 16 months ago 891MB
aqa_alp319 latest 8475f9626722 17 months ago 921MB
aqa_alp320 latest bb109aa79818 3 weeks ago 931MB
aqa_cent7 latest 4ea7520c6258 14 months ago 2.21GB
aqa_f39 latest 9af18f560a84 17 months ago 1.83GB
aqa_f42 latest 921986e8b43d 3 weeks ago 1.58GB
aqa_u2004 latest f8c0eb2f880a 17 months ago 1.29GB
aqa_u2204 latest 698ce5490bea 3 weeks ago 1.29GB
aqa_u2404 latest 17718ce9385a 3 weeks ago 1.45GB
aqa_ubi10 latest a8cb0c2b3659 29 minutes ago 2.17GB
aqa_ubi10_bloat latest f0eba4dbec8c 12 minutes ago 2.36GB
aqa_ubi10_noperl latest d950aa0e3511 2 minutes ago 1.78GB
aqa_ubi9 latest 203cc5782498 3 weeks ago 1.99GB