infrastructure icon indicating copy to clipboard operation
infrastructure copied to clipboard

Static docker dockerfile enhancements

Open sxa opened this issue 3 months ago • 0 comments

While doing some updates for the UBI10 containers I felt a few updates would be in order throughout the dockerfiles:

  1. 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)
  2. Avoid storing the intermediate JDK download tarball. GPG signature verification can still be performed as per https://fosstodon.org/@sxa/113006634193117351
  3. Look at whether the same can be done for the ant/ant-contrib downloads
  4. Only use the JRE, not the full JDK (Seems ok for the openjdk tests, may need to check others)
  5. Move perl install 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.
  6. (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

sxa avatar Aug 27 '25 12:08 sxa