From 9316f0314816ae97aca2a08cff8a566c9bdfa9db Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 25 Oct 2023 23:19:57 +0100 Subject: [PATCH] further dockerfile refactor enhancements --- 11/jdk/alpine/Dockerfile | 19 +++++-- 11/jdk/centos/Dockerfile | 22 ++++---- 11/jdk/ubi/ubi9-minimal/Dockerfile | 13 ++++- 11/jdk/ubuntu/focal/Dockerfile | 20 ++++---- 11/jdk/ubuntu/jammy/Dockerfile | 20 ++++---- 11/jdk/windows/nanoserver-1809/Dockerfile | 8 +-- 11/jdk/windows/nanoserver-ltsc2022/Dockerfile | 8 +-- 11/jre/alpine/Dockerfile | 19 +++++-- 11/jre/centos/Dockerfile | 22 ++++---- 11/jre/ubi/ubi9-minimal/Dockerfile | 13 ++++- 11/jre/ubuntu/focal/Dockerfile | 20 ++++---- 11/jre/ubuntu/jammy/Dockerfile | 20 ++++---- 11/jre/windows/nanoserver-1809/Dockerfile | 6 +-- 11/jre/windows/nanoserver-ltsc2022/Dockerfile | 6 +-- 17/jdk/alpine/Dockerfile | 22 ++++++-- 17/jdk/centos/Dockerfile | 28 +++++----- 17/jdk/ubi/ubi9-minimal/Dockerfile | 16 +++++- 17/jdk/ubuntu/focal/Dockerfile | 26 +++++----- 17/jdk/ubuntu/jammy/Dockerfile | 26 +++++----- 17/jre/alpine/Dockerfile | 22 ++++++-- 17/jre/centos/Dockerfile | 28 +++++----- 17/jre/ubi/ubi9-minimal/Dockerfile | 16 +++++- 17/jre/ubuntu/focal/Dockerfile | 26 +++++----- 17/jre/ubuntu/jammy/Dockerfile | 26 +++++----- 21/jdk/alpine/Dockerfile | 22 ++++++-- 21/jdk/ubi/ubi9-minimal/Dockerfile | 16 +++++- 21/jdk/ubuntu/jammy/Dockerfile | 26 +++++----- 21/jdk/windows/nanoserver-1809/Dockerfile | 2 +- 21/jdk/windows/nanoserver-ltsc2022/Dockerfile | 2 +- .../windows/windowsservercore-1809/Dockerfile | 2 +- .../windowsservercore-ltsc2022/Dockerfile | 2 +- 21/jre/alpine/Dockerfile | 22 ++++++-- 21/jre/ubi/ubi9-minimal/Dockerfile | 16 +++++- 21/jre/ubuntu/jammy/Dockerfile | 26 +++++----- 21/jre/windows/nanoserver-1809/Dockerfile | 2 +- 21/jre/windows/nanoserver-ltsc2022/Dockerfile | 2 +- .../windows/windowsservercore-1809/Dockerfile | 2 +- .../windowsservercore-ltsc2022/Dockerfile | 2 +- 8/jdk/alpine/Dockerfile | 51 ++++++++++++------- 8/jdk/centos/Dockerfile | 22 ++++---- 8/jdk/ubi/ubi9-minimal/Dockerfile | 13 ++++- 8/jdk/ubuntu/focal/Dockerfile | 20 ++++---- 8/jdk/ubuntu/jammy/Dockerfile | 20 ++++---- 8/jdk/windows/nanoserver-1809/Dockerfile | 8 +-- 8/jdk/windows/nanoserver-ltsc2022/Dockerfile | 8 +-- 8/jre/alpine/Dockerfile | 49 +++++++++++------- 8/jre/centos/Dockerfile | 22 ++++---- 8/jre/ubi/ubi9-minimal/Dockerfile | 13 ++++- 8/jre/ubuntu/focal/Dockerfile | 20 ++++---- 8/jre/ubuntu/jammy/Dockerfile | 20 ++++---- 8/jre/windows/nanoserver-1809/Dockerfile | 6 +-- 8/jre/windows/nanoserver-ltsc2022/Dockerfile | 6 +-- docker_templates/alpine-linux.Dockerfile.j2 | 22 +++++--- docker_templates/centos.Dockerfile.j2 | 34 +++++-------- docker_templates/nanoserver.Dockerfile.j2 | 7 ++- docker_templates/partials/arch-variable.j2 | 7 +++ docker_templates/partials/binutils.j2 | 5 ++ .../partials/multi-arch-install.j2 | 2 + .../partials/version-check-windows.j2 | 11 +--- docker_templates/partials/version-check.j2 | 6 +-- docker_templates/ubi9-minimal.Dockerfile.j2 | 16 ++++-- docker_templates/ubuntu.Dockerfile.j2 | 32 +++++------- generate_dockerfiles.py | 2 +- 63 files changed, 621 insertions(+), 397 deletions(-) create mode 100644 docker_templates/partials/arch-variable.j2 create mode 100644 docker_templates/partials/binutils.j2 diff --git a/11/jdk/alpine/Dockerfile b/11/jdk/alpine/Dockerfile index 104bd8e1c..5ba0a2df4 100644 --- a/11/jdk/alpine/Dockerfile +++ b/11/jdk/alpine/Dockerfile @@ -26,10 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - # fontconfig and ttf-dejavu added to support serverside image generation by Java programs - # java-cacerts added to support adding CA certificates to the Java keystore - # bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415) - apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + tzdata \ + ; \ rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk-11.0.21+9 diff --git a/11/jdk/centos/Dockerfile b/11/jdk/centos/Dockerfile index ef5d357bc..2a7da4f90 100644 --- a/11/jdk/centos/Dockerfile +++ b/11/jdk/centos/Dockerfile @@ -27,17 +27,17 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ yum install -y \ - gzip \ - tar \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - tzdata \ - openssl \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates \ - fontconfig \ + gzip \ + tar \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + tzdata \ + openssl \ + # utilities for keeping Centos and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ ; \ rm -rf /var/cache/yum diff --git a/11/jdk/ubi/ubi9-minimal/Dockerfile b/11/jdk/ubi/ubi9-minimal/Dockerfile index 0ad81f47c..e00bbadb9 100644 --- a/11/jdk/ubi/ubi9-minimal/Dockerfile +++ b/11/jdk/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,18 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk-11.0.21+9 diff --git a/11/jdk/ubuntu/focal/Dockerfile b/11/jdk/ubuntu/focal/Dockerfile index 0b413f6f3..846e704a2 100644 --- a/11/jdk/ubuntu/focal/Dockerfile +++ b/11/jdk/ubuntu/focal/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/11/jdk/ubuntu/jammy/Dockerfile b/11/jdk/ubuntu/jammy/Dockerfile index 907e7177e..bf878ae40 100644 --- a/11/jdk/ubuntu/jammy/Dockerfile +++ b/11/jdk/ubuntu/jammy/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/11/jdk/windows/nanoserver-1809/Dockerfile b/11/jdk/windows/nanoserver-1809/Dockerfile index 39ff4ee50..06c4f8251 100644 --- a/11/jdk/windows/nanoserver-1809/Dockerfile +++ b/11/jdk/windows/nanoserver-1809/Dockerfile @@ -33,9 +33,9 @@ USER ContainerUser COPY --from=eclipse-temurin:11.0.21_9-jdk-windowsservercore-1809 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "javac --version"; javac --version; \ - echo "java --version"; java --version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. CMD ["jshell"] diff --git a/11/jdk/windows/nanoserver-ltsc2022/Dockerfile b/11/jdk/windows/nanoserver-ltsc2022/Dockerfile index d96bd01b4..a5d681f7f 100644 --- a/11/jdk/windows/nanoserver-ltsc2022/Dockerfile +++ b/11/jdk/windows/nanoserver-ltsc2022/Dockerfile @@ -33,9 +33,9 @@ USER ContainerUser COPY --from=eclipse-temurin:11.0.21_9-jdk-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "javac --version"; javac --version; \ - echo "java --version"; java --version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. CMD ["jshell"] diff --git a/11/jre/alpine/Dockerfile b/11/jre/alpine/Dockerfile index 3514b88d3..5c68ea3da 100644 --- a/11/jre/alpine/Dockerfile +++ b/11/jre/alpine/Dockerfile @@ -26,10 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - # fontconfig and ttf-dejavu added to support serverside image generation by Java programs - # java-cacerts added to support adding CA certificates to the Java keystore - # bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415) - apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + tzdata \ + ; \ rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk-11.0.21+9 diff --git a/11/jre/centos/Dockerfile b/11/jre/centos/Dockerfile index acd7281ef..587b7b4e4 100644 --- a/11/jre/centos/Dockerfile +++ b/11/jre/centos/Dockerfile @@ -27,17 +27,17 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ yum install -y \ - gzip \ - tar \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - tzdata \ - openssl \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates \ - fontconfig \ + gzip \ + tar \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + tzdata \ + openssl \ + # utilities for keeping Centos and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ ; \ rm -rf /var/cache/yum diff --git a/11/jre/ubi/ubi9-minimal/Dockerfile b/11/jre/ubi/ubi9-minimal/Dockerfile index ce128d397..694790fbc 100644 --- a/11/jre/ubi/ubi9-minimal/Dockerfile +++ b/11/jre/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,18 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk-11.0.21+9 diff --git a/11/jre/ubuntu/focal/Dockerfile b/11/jre/ubuntu/focal/Dockerfile index 81428a69e..66eff4292 100644 --- a/11/jre/ubuntu/focal/Dockerfile +++ b/11/jre/ubuntu/focal/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/11/jre/ubuntu/jammy/Dockerfile b/11/jre/ubuntu/jammy/Dockerfile index d3cab7b82..73d5ea9c6 100644 --- a/11/jre/ubuntu/jammy/Dockerfile +++ b/11/jre/ubuntu/jammy/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/11/jre/windows/nanoserver-1809/Dockerfile b/11/jre/windows/nanoserver-1809/Dockerfile index b36948ed6..889cdb7e8 100644 --- a/11/jre/windows/nanoserver-1809/Dockerfile +++ b/11/jre/windows/nanoserver-1809/Dockerfile @@ -33,6 +33,6 @@ USER ContainerUser COPY --from=eclipse-temurin:11.0.21_9-jre-windowsservercore-1809 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "java --version"; java --version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo java --version && java --version \ + && echo Complete. diff --git a/11/jre/windows/nanoserver-ltsc2022/Dockerfile b/11/jre/windows/nanoserver-ltsc2022/Dockerfile index 3e2733b59..fd7a68b53 100644 --- a/11/jre/windows/nanoserver-ltsc2022/Dockerfile +++ b/11/jre/windows/nanoserver-ltsc2022/Dockerfile @@ -33,6 +33,6 @@ USER ContainerUser COPY --from=eclipse-temurin:11.0.21_9-jre-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "java --version"; java --version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo java --version && java --version \ + && echo Complete. diff --git a/17/jdk/alpine/Dockerfile b/17/jdk/alpine/Dockerfile index ab320406e..558a8bd69 100644 --- a/17/jdk/alpine/Dockerfile +++ b/17/jdk/alpine/Dockerfile @@ -26,10 +26,24 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - # fontconfig and ttf-dejavu added to support serverside image generation by Java programs - # java-cacerts added to support adding CA certificates to the Java keystore - # bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415) - apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + ; \ rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk-17.0.9+9 diff --git a/17/jdk/centos/Dockerfile b/17/jdk/centos/Dockerfile index 18718902b..e2ee1630b 100644 --- a/17/jdk/centos/Dockerfile +++ b/17/jdk/centos/Dockerfile @@ -27,20 +27,20 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ yum install -y \ - gzip \ - tar \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - tzdata \ - openssl \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates \ - fontconfig \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ + gzip \ + tar \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + tzdata \ + openssl \ + # utilities for keeping Centos and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + fontconfig \ ; \ rm -rf /var/cache/yum diff --git a/17/jdk/ubi/ubi9-minimal/Dockerfile b/17/jdk/ubi/ubi9-minimal/Dockerfile index df8662b44..bfcc8193e 100644 --- a/17/jdk/ubi/ubi9-minimal/Dockerfile +++ b/17/jdk/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk-17.0.9+9 diff --git a/17/jdk/ubuntu/focal/Dockerfile b/17/jdk/ubuntu/focal/Dockerfile index 650c3c614..bcc9d6cf6 100644 --- a/17/jdk/ubuntu/focal/Dockerfile +++ b/17/jdk/ubuntu/focal/Dockerfile @@ -28,19 +28,19 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/17/jdk/ubuntu/jammy/Dockerfile b/17/jdk/ubuntu/jammy/Dockerfile index 05b2d7870..dec720848 100644 --- a/17/jdk/ubuntu/jammy/Dockerfile +++ b/17/jdk/ubuntu/jammy/Dockerfile @@ -28,19 +28,19 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/17/jre/alpine/Dockerfile b/17/jre/alpine/Dockerfile index e9555ca2f..ded028d10 100644 --- a/17/jre/alpine/Dockerfile +++ b/17/jre/alpine/Dockerfile @@ -26,10 +26,24 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - # fontconfig and ttf-dejavu added to support serverside image generation by Java programs - # java-cacerts added to support adding CA certificates to the Java keystore - # bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415) - apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + ; \ rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk-17.0.9+9 diff --git a/17/jre/centos/Dockerfile b/17/jre/centos/Dockerfile index 5558ee836..4a351d6c2 100644 --- a/17/jre/centos/Dockerfile +++ b/17/jre/centos/Dockerfile @@ -27,20 +27,20 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ yum install -y \ - gzip \ - tar \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - tzdata \ - openssl \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates \ - fontconfig \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ + gzip \ + tar \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + tzdata \ + openssl \ + # utilities for keeping Centos and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + fontconfig \ ; \ rm -rf /var/cache/yum diff --git a/17/jre/ubi/ubi9-minimal/Dockerfile b/17/jre/ubi/ubi9-minimal/Dockerfile index 5eb70ce50..6b7ffef9a 100644 --- a/17/jre/ubi/ubi9-minimal/Dockerfile +++ b/17/jre/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk-17.0.9+9 diff --git a/17/jre/ubuntu/focal/Dockerfile b/17/jre/ubuntu/focal/Dockerfile index 430f7801d..6762758a9 100644 --- a/17/jre/ubuntu/focal/Dockerfile +++ b/17/jre/ubuntu/focal/Dockerfile @@ -28,19 +28,19 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/17/jre/ubuntu/jammy/Dockerfile b/17/jre/ubuntu/jammy/Dockerfile index e674d957b..0dd8915a6 100644 --- a/17/jre/ubuntu/jammy/Dockerfile +++ b/17/jre/ubuntu/jammy/Dockerfile @@ -28,19 +28,19 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/21/jdk/alpine/Dockerfile b/21/jdk/alpine/Dockerfile index e18618e96..dacf2cc6f 100644 --- a/21/jdk/alpine/Dockerfile +++ b/21/jdk/alpine/Dockerfile @@ -26,10 +26,24 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - # fontconfig and ttf-dejavu added to support serverside image generation by Java programs - # java-cacerts added to support adding CA certificates to the Java keystore - # bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415) - apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + ; \ rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk-21.0.1+12 diff --git a/21/jdk/ubi/ubi9-minimal/Dockerfile b/21/jdk/ubi/ubi9-minimal/Dockerfile index 4723ae699..b8e1d8e6d 100644 --- a/21/jdk/ubi/ubi9-minimal/Dockerfile +++ b/21/jdk/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk-21.0.1+12 diff --git a/21/jdk/ubuntu/jammy/Dockerfile b/21/jdk/ubuntu/jammy/Dockerfile index 35562be0c..bfbd016fa 100644 --- a/21/jdk/ubuntu/jammy/Dockerfile +++ b/21/jdk/ubuntu/jammy/Dockerfile @@ -28,19 +28,19 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/21/jdk/windows/nanoserver-1809/Dockerfile b/21/jdk/windows/nanoserver-1809/Dockerfile index 9622382e0..5208c212e 100644 --- a/21/jdk/windows/nanoserver-1809/Dockerfile +++ b/21/jdk/windows/nanoserver-1809/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/21/jdk/windows/nanoserver-ltsc2022/Dockerfile b/21/jdk/windows/nanoserver-ltsc2022/Dockerfile index 919397406..22a7da54f 100644 --- a/21/jdk/windows/nanoserver-ltsc2022/Dockerfile +++ b/21/jdk/windows/nanoserver-ltsc2022/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/21/jdk/windows/windowsservercore-1809/Dockerfile b/21/jdk/windows/windowsservercore-1809/Dockerfile index d0aa7e093..1b40b004b 100644 --- a/21/jdk/windows/windowsservercore-1809/Dockerfile +++ b/21/jdk/windows/windowsservercore-1809/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/21/jdk/windows/windowsservercore-ltsc2022/Dockerfile b/21/jdk/windows/windowsservercore-ltsc2022/Dockerfile index e650c8e06..00d62adb7 100644 --- a/21/jdk/windows/windowsservercore-ltsc2022/Dockerfile +++ b/21/jdk/windows/windowsservercore-ltsc2022/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/21/jre/alpine/Dockerfile b/21/jre/alpine/Dockerfile index c941a48e6..afb1d21ed 100644 --- a/21/jre/alpine/Dockerfile +++ b/21/jre/alpine/Dockerfile @@ -26,10 +26,24 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - # fontconfig and ttf-dejavu added to support serverside image generation by Java programs - # java-cacerts added to support adding CA certificates to the Java keystore - # bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415) - apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + ; \ rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk-21.0.1+12 diff --git a/21/jre/ubi/ubi9-minimal/Dockerfile b/21/jre/ubi/ubi9-minimal/Dockerfile index b3e035559..44e62935f 100644 --- a/21/jre/ubi/ubi9-minimal/Dockerfile +++ b/21/jre/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,21 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk-21.0.1+12 diff --git a/21/jre/ubuntu/jammy/Dockerfile b/21/jre/ubuntu/jammy/Dockerfile index 64e476c3b..4248fed81 100644 --- a/21/jre/ubuntu/jammy/Dockerfile +++ b/21/jre/ubuntu/jammy/Dockerfile @@ -28,19 +28,19 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/21/jre/windows/nanoserver-1809/Dockerfile b/21/jre/windows/nanoserver-1809/Dockerfile index 677522c57..4a9336e24 100644 --- a/21/jre/windows/nanoserver-1809/Dockerfile +++ b/21/jre/windows/nanoserver-1809/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/21/jre/windows/nanoserver-ltsc2022/Dockerfile b/21/jre/windows/nanoserver-ltsc2022/Dockerfile index c389b02a4..727e00b41 100644 --- a/21/jre/windows/nanoserver-ltsc2022/Dockerfile +++ b/21/jre/windows/nanoserver-ltsc2022/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/21/jre/windows/windowsservercore-1809/Dockerfile b/21/jre/windows/windowsservercore-1809/Dockerfile index 4e9b2c2fe..7b6001993 100644 --- a/21/jre/windows/windowsservercore-1809/Dockerfile +++ b/21/jre/windows/windowsservercore-1809/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/21/jre/windows/windowsservercore-ltsc2022/Dockerfile b/21/jre/windows/windowsservercore-ltsc2022/Dockerfile index a971397f2..dc20408f8 100644 --- a/21/jre/windows/windowsservercore-ltsc2022/Dockerfile +++ b/21/jre/windows/windowsservercore-ltsc2022/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ diff --git a/8/jdk/alpine/Dockerfile b/8/jdk/alpine/Dockerfile index b7782df07..60df9496a 100644 --- a/8/jdk/alpine/Dockerfile +++ b/8/jdk/alpine/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ @@ -25,11 +25,23 @@ ENV PATH $JAVA_HOME/bin:$PATH # Default to UTF-8 file.encoding ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' -# fontconfig and ttf-dejavu added to support serverside image generation by Java programs -# java-cacerts added to support adding CA certificates to the Java keystore -# bash is required for the entrypoint script (s. https://github.com/adoptium/containers/issues/415) -RUN apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib \ - && rm -rf /var/cache/apk/* +RUN set -eux; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + tzdata \ + ; \ + rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk8u382-b05 @@ -45,20 +57,21 @@ RUN set -eux; \ exit 1; \ ;; \ esac; \ - wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p "$JAVA_HOME"; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory "$JAVA_HOME" \ - --strip-components 1 \ - --no-same-owner \ - ; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; -RUN echo Verifying install ... \ - && echo javac -version && javac -version \ - && echo java -version && java -version \ - && echo Complete. +RUN set -eux; \ + echo "Verifying install ..."; \ + echo "javac -version"; javac -version; \ + echo "java -version"; java -version; \ + echo "Complete." COPY entrypoint.sh /__cacert_entrypoint.sh ENTRYPOINT ["/__cacert_entrypoint.sh"] diff --git a/8/jdk/centos/Dockerfile b/8/jdk/centos/Dockerfile index a67ac8a69..ae2755594 100644 --- a/8/jdk/centos/Dockerfile +++ b/8/jdk/centos/Dockerfile @@ -27,17 +27,17 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ yum install -y \ - gzip \ - tar \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - tzdata \ - openssl \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates \ - fontconfig \ + gzip \ + tar \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + tzdata \ + openssl \ + # utilities for keeping Centos and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ ; \ rm -rf /var/cache/yum diff --git a/8/jdk/ubi/ubi9-minimal/Dockerfile b/8/jdk/ubi/ubi9-minimal/Dockerfile index 95ecf4063..2b96ed908 100644 --- a/8/jdk/ubi/ubi9-minimal/Dockerfile +++ b/8/jdk/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,18 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk8u392-b08 diff --git a/8/jdk/ubuntu/focal/Dockerfile b/8/jdk/ubuntu/focal/Dockerfile index 5f272a79e..5bf1be677 100644 --- a/8/jdk/ubuntu/focal/Dockerfile +++ b/8/jdk/ubuntu/focal/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/8/jdk/ubuntu/jammy/Dockerfile b/8/jdk/ubuntu/jammy/Dockerfile index f274819d6..d45cb76ee 100644 --- a/8/jdk/ubuntu/jammy/Dockerfile +++ b/8/jdk/ubuntu/jammy/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/8/jdk/windows/nanoserver-1809/Dockerfile b/8/jdk/windows/nanoserver-1809/Dockerfile index 9837a737b..609aff572 100644 --- a/8/jdk/windows/nanoserver-1809/Dockerfile +++ b/8/jdk/windows/nanoserver-1809/Dockerfile @@ -33,7 +33,7 @@ USER ContainerUser COPY --from=eclipse-temurin:8u392-b08-jdk-windowsservercore-1809 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "javac -version"; javac -version; \ - echo "java -version"; java -version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo javac -version && javac -version \ + && echo java -version && java -version \ + && echo Complete. diff --git a/8/jdk/windows/nanoserver-ltsc2022/Dockerfile b/8/jdk/windows/nanoserver-ltsc2022/Dockerfile index 4db3704ca..6d719e754 100644 --- a/8/jdk/windows/nanoserver-ltsc2022/Dockerfile +++ b/8/jdk/windows/nanoserver-ltsc2022/Dockerfile @@ -33,7 +33,7 @@ USER ContainerUser COPY --from=eclipse-temurin:8u392-b08-jdk-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "javac -version"; javac -version; \ - echo "java -version"; java -version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo javac -version && javac -version \ + && echo java -version && java -version \ + && echo Complete. diff --git a/8/jre/alpine/Dockerfile b/8/jre/alpine/Dockerfile index f7d4bc4c2..84eae55ac 100644 --- a/8/jre/alpine/Dockerfile +++ b/8/jre/alpine/Dockerfile @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# NOTE: THIS DOCKERFILE IS GENERATED VIA "generate_dockerfiles.py" # # PLEASE DO NOT EDIT IT DIRECTLY. # ------------------------------------------------------------------------------ @@ -25,11 +25,23 @@ ENV PATH $JAVA_HOME/bin:$PATH # Default to UTF-8 file.encoding ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' -# fontconfig and ttf-dejavu added to support serverside image generation by Java programs -# java-cacerts added to support adding CA certificates to the Java keystore -# bash is required for the entrypoint script (s. https://github.com/adoptium/containers/issues/415) -RUN apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib \ - && rm -rf /var/cache/apk/* +RUN set -eux; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ + tzdata \ + ; \ + rm -rf /var/cache/apk/* ENV JAVA_VERSION jdk8u382-b05 @@ -45,19 +57,20 @@ RUN set -eux; \ exit 1; \ ;; \ esac; \ - wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p "$JAVA_HOME"; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory "$JAVA_HOME" \ - --strip-components 1 \ - --no-same-owner \ - ; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; -RUN echo Verifying install ... \ - && echo java -version && java -version \ - && echo Complete. +RUN set -eux; \ + echo "Verifying install ..."; \ + echo "java -version"; java -version; \ + echo "Complete." COPY entrypoint.sh /__cacert_entrypoint.sh ENTRYPOINT ["/__cacert_entrypoint.sh"] diff --git a/8/jre/centos/Dockerfile b/8/jre/centos/Dockerfile index 52de2e222..50a34051d 100644 --- a/8/jre/centos/Dockerfile +++ b/8/jre/centos/Dockerfile @@ -27,17 +27,17 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ yum install -y \ - gzip \ - tar \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - tzdata \ - openssl \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates \ - fontconfig \ + gzip \ + tar \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + tzdata \ + openssl \ + # utilities for keeping Centos and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ ; \ rm -rf /var/cache/yum diff --git a/8/jre/ubi/ubi9-minimal/Dockerfile b/8/jre/ubi/ubi9-minimal/Dockerfile index 8c14979db..bba0c4fa0 100644 --- a/8/jre/ubi/ubi9-minimal/Dockerfile +++ b/8/jre/ubi/ubi9-minimal/Dockerfile @@ -26,7 +26,18 @@ ENV PATH $JAVA_HOME/bin:$PATH ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION jdk8u392-b08 diff --git a/8/jre/ubuntu/focal/Dockerfile b/8/jre/ubuntu/focal/Dockerfile index d90a51469..08885d82f 100644 --- a/8/jre/ubuntu/focal/Dockerfile +++ b/8/jre/ubuntu/focal/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/8/jre/ubuntu/jammy/Dockerfile b/8/jre/ubuntu/jammy/Dockerfile index e4ee9ed76..2bf37107d 100644 --- a/8/jre/ubuntu/jammy/Dockerfile +++ b/8/jre/ubuntu/jammy/Dockerfile @@ -28,16 +28,16 @@ ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ diff --git a/8/jre/windows/nanoserver-1809/Dockerfile b/8/jre/windows/nanoserver-1809/Dockerfile index 765c3059f..8d75a2414 100644 --- a/8/jre/windows/nanoserver-1809/Dockerfile +++ b/8/jre/windows/nanoserver-1809/Dockerfile @@ -33,6 +33,6 @@ USER ContainerUser COPY --from=eclipse-temurin:8u392-b08-jre-windowsservercore-1809 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "java -version"; java -version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo java -version && java -version \ + && echo Complete. diff --git a/8/jre/windows/nanoserver-ltsc2022/Dockerfile b/8/jre/windows/nanoserver-ltsc2022/Dockerfile index 2340d7bfd..c4481cb96 100644 --- a/8/jre/windows/nanoserver-ltsc2022/Dockerfile +++ b/8/jre/windows/nanoserver-ltsc2022/Dockerfile @@ -33,6 +33,6 @@ USER ContainerUser COPY --from=eclipse-temurin:8u392-b08-jre-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME -RUN echo "Verifying install ..."; \ - echo "java -version"; java -version; \ - echo "Complete." +RUN echo Verifying install ... \ + && echo java -version && java -version \ + && echo Complete. diff --git a/docker_templates/alpine-linux.Dockerfile.j2 b/docker_templates/alpine-linux.Dockerfile.j2 index eeffbc49a..fbe694aa5 100644 --- a/docker_templates/alpine-linux.Dockerfile.j2 +++ b/docker_templates/alpine-linux.Dockerfile.j2 @@ -5,16 +5,26 @@ FROM {{ base_image }} {% include 'partials/nix-env.j2' %} RUN set -eux; \ - # fontconfig and ttf-dejavu added to support serverside image generation by Java programs - # java-cacerts added to support adding CA certificates to the Java keystore - # bash is required for the entrypoint script (see https://github.com/adoptium/containers/issues/415) - apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib; \ + apk add --no-cache \ + # bash is required for the entrypoint script + # see https://github.com/adoptium/containers/issues/415 + bash \ + # fontconfig and ttf-dejavu added to support serverside image generation by Java programs + fontconfig ttf-dejavu \ + # java-cacerts added to support adding CA certificates to the Java keystore + java-cacerts \ + # fixes issues with apk del apk-tools + # see https://github.com/adoptium/containers/issues/136 + libretls zlib \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + musl-locales musl-locales-lang \ +{% include 'partials/binutils.j2' -%} + tzdata \ + ; \ rm -rf /var/cache/apk/* ENV JAVA_VERSION {{ java_version }} -RUN set -eux; \ - ARCH="$(apk --print-arch)"; \ {% include 'partials/multi-arch-install.j2' %} {% include 'partials/version-check.j2' %} diff --git a/docker_templates/centos.Dockerfile.j2 b/docker_templates/centos.Dockerfile.j2 index f28e53fb7..c4d65146e 100644 --- a/docker_templates/centos.Dockerfile.j2 +++ b/docker_templates/centos.Dockerfile.j2 @@ -6,31 +6,25 @@ FROM {{ base_image }} RUN set -eux; \ yum install -y \ - gzip \ - tar \ - {% if version|int < 22 -%} - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - {% endif -%} - wget \ - tzdata \ - openssl \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates \ - fontconfig \ - {% if version|int >= 13 -%} - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - {% endif -%} + gzip \ + tar \ + {% if version|int < 22 -%} + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + {% endif -%} + wget \ + tzdata \ + openssl \ + # utilities for keeping Centos and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ +{% include 'partials/binutils.j2' -%} + fontconfig \ ; \ rm -rf /var/cache/yum ENV JAVA_VERSION {{ java_version }} -RUN set -eux; \ - ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ {% include 'partials/multi-arch-install.j2' %} {% include 'partials/version-check.j2' %} diff --git a/docker_templates/nanoserver.Dockerfile.j2 b/docker_templates/nanoserver.Dockerfile.j2 index d40f7fd9b..7341568bc 100644 --- a/docker_templates/nanoserver.Dockerfile.j2 +++ b/docker_templates/nanoserver.Dockerfile.j2 @@ -16,5 +16,10 @@ USER ContainerUser COPY --from=eclipse-temurin:{{ arch_data.copy_from }} $JAVA_HOME $JAVA_HOME -{% include 'partials/version-check.j2' %} +RUN echo Verifying install ... \ + {% if image_type == "jdk" -%} + && echo javac {% if version|int >= 11 %}--{% else %}-{% endif %}version && javac {% if version|int >= 11 %}--{% else %}-{% endif %}version \ + {% endif -%} + && echo java {% if version|int >= 11 %}--{% else %}-{% endif %}version && java {% if version|int >= 11 %}--{% else %}-{% endif %}version \ + && echo Complete. {% include 'partials/jshell.j2' %} \ No newline at end of file diff --git a/docker_templates/partials/arch-variable.j2 b/docker_templates/partials/arch-variable.j2 new file mode 100644 index 000000000..0256e81e9 --- /dev/null +++ b/docker_templates/partials/arch-variable.j2 @@ -0,0 +1,7 @@ +{%- if os == "ubuntu" %} + ARCH="$(dpkg --print-architecture)"; \ +{%- elif os == "alpine-linux" %} + ARCH="$(apk --print-arch)"; \ +{%- elif os == "centos" or os == "ubi9-minimal" %} + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ +{%- endif -%} \ No newline at end of file diff --git a/docker_templates/partials/binutils.j2 b/docker_templates/partials/binutils.j2 new file mode 100644 index 000000000..9a1aa8da3 --- /dev/null +++ b/docker_templates/partials/binutils.j2 @@ -0,0 +1,5 @@ + {% if version|int >= 13 -%} + # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 + # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory + binutils \ + {% endif -%} \ No newline at end of file diff --git a/docker_templates/partials/multi-arch-install.j2 b/docker_templates/partials/multi-arch-install.j2 index b315f1358..1b32f8a77 100644 --- a/docker_templates/partials/multi-arch-install.j2 +++ b/docker_templates/partials/multi-arch-install.j2 @@ -1,3 +1,5 @@ +RUN set -eux; \ +{%- include 'partials/arch-variable.j2' %} case "${ARCH}" in \ {% for architecture, details in arch_data.items() -%} {{ architecture }}) \ diff --git a/docker_templates/partials/version-check-windows.j2 b/docker_templates/partials/version-check-windows.j2 index 780eb25a4..fa4c2daac 100644 --- a/docker_templates/partials/version-check-windows.j2 +++ b/docker_templates/partials/version-check-windows.j2 @@ -1,14 +1,7 @@ RUN Write-Host 'Verifying install ...'; \ - {% if version|int >= 11 -%} {% if image_type == "jdk" -%} - Write-Host 'javac --version'; javac --version; \ - {% endif -%} - Write-Host 'java --version'; java --version; \ - {% else -%} - {% if image_type == "jdk" -%} - Write-Host 'javac -version'; javac -version; \ - {% endif -%} - Write-Host 'java -version'; java -version; \ + Write-Host 'javac {% if version|int >= 11 %}--{% else %}-{% endif %}version'; javac {% if version|int >= 11 %}--{% else %}-{% endif %}version; \ {% endif -%} + Write-Host 'java {% if version|int >= 11 %}--{% else %}-{% endif %}version'; java {% if version|int >= 11 %}--{% else %}-{% endif %}version; \ \ Write-Host 'Complete.' \ No newline at end of file diff --git a/docker_templates/partials/version-check.j2 b/docker_templates/partials/version-check.j2 index 5ed2fe14a..50afca768 100644 --- a/docker_templates/partials/version-check.j2 +++ b/docker_templates/partials/version-check.j2 @@ -1,6 +1,6 @@ -RUN {% if os_family != "windows" %}set -eux; \ - {% else %}{% endif %}echo "Verifying install ..."; \ - {% if os_family != "windows" and image_type == "jdk" and version|int >= 11 -%} +RUN set -eux; \ + echo "Verifying install ..."; \ + {% if image_type == "jdk" and version|int >= 11 -%} fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java; \ {% endif -%} {% if image_type == "jdk" -%} diff --git a/docker_templates/ubi9-minimal.Dockerfile.j2 b/docker_templates/ubi9-minimal.Dockerfile.j2 index 9a2ebbfa3..38dd86c75 100644 --- a/docker_templates/ubi9-minimal.Dockerfile.j2 +++ b/docker_templates/ubi9-minimal.Dockerfile.j2 @@ -5,13 +5,23 @@ FROM {{ base_image }} {% include 'partials/nix-env.j2' %} RUN set -eux; \ - microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar; \ + microdnf install -y \ + gzip \ + tar \ +{% include 'partials/binutils.j2' -%} + tzdata \ + openssl \ + wget \ + # utilities for keeping UBI and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates \ + fontconfig \ + glibc-langpack-en \ + ; \ microdnf clean all ENV JAVA_VERSION {{ java_version }} -RUN set -eux; \ - ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ {% include 'partials/multi-arch-install.j2' %} {% include 'partials/version-check.j2' %} diff --git a/docker_templates/ubuntu.Dockerfile.j2 b/docker_templates/ubuntu.Dockerfile.j2 index 8991dc917..8d8531b24 100644 --- a/docker_templates/ubuntu.Dockerfile.j2 +++ b/docker_templates/ubuntu.Dockerfile.j2 @@ -7,23 +7,19 @@ FROM {{ base_image }} RUN set -eux; \ apt-get update; \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ - {% if version|int < 22 -%} - # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 - curl \ - {% endif -%} - wget \ - fontconfig \ - # utilities for keeping Ubuntu and OpenJDK CA certificates in sync - # https://github.com/adoptium/containers/issues/293 - ca-certificates p11-kit \ - {% if version|int >= 13 -%} - # jlink --strip-debug on 13+ needs objcopy: https://github.com/docker-library/openjdk/issues/351 - # Error: java.io.IOException: Cannot run program "objcopy": error=2, No such file or directory - binutils \ - {% endif -%} - tzdata \ - # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 - locales \ + {% if version|int < 22 -%} + # curl required for historical reasons, see https://github.com/adoptium/containers/issues/255 + curl \ + {% endif -%} + wget \ + fontconfig \ + # utilities for keeping Ubuntu and OpenJDK CA certificates in sync + # https://github.com/adoptium/containers/issues/293 + ca-certificates p11-kit \ +{% include 'partials/binutils.j2' -%} + tzdata \ + # locales ensures proper character encoding and locale-specific behaviors using en_US.UTF-8 + locales \ ; \ echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \ locale-gen en_US.UTF-8; \ @@ -31,8 +27,6 @@ RUN set -eux; \ ENV JAVA_VERSION {{ java_version }} -RUN set -eux; \ - ARCH="$(dpkg --print-architecture)"; \ {% include 'partials/multi-arch-install.j2' %} \ # https://github.com/docker-library/openjdk/issues/331#issuecomment-498834472 find "$JAVA_HOME/lib" -name '*.so' -exec dirname '{}' ';' | sort -u > /etc/ld.so.conf.d/docker-openjdk.conf; \ diff --git a/generate_dockerfiles.py b/generate_dockerfiles.py index c5461d037..699ea1b4c 100644 --- a/generate_dockerfiles.py +++ b/generate_dockerfiles.py @@ -74,7 +74,7 @@ def archHelper(arch, os_family): os.makedirs(output_directory, exist_ok=True) # Fetch latest release for version from Adoptium API - url = f"https://api.adoptium.net/v3/assets/feature_releases/{version}/ga?page=0&image_type={image_type}&page_size=1&vendor=eclipse" + url = f"https://api.adoptium.net/v3/assets/feature_releases/{version}/ga?page=0&image_type={image_type}&os={os_family}&page_size=1&vendor=eclipse" response = requests.get(url, headers=headers) response.raise_for_status() data = response.json()