From 77bc1576d043351db9e21103826e7a2b4951087c Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Thu, 14 Mar 2024 21:36:11 +0000 Subject: [PATCH 01/11] Add 22 --- 22/headful/al2023/Dockerfile | 24 ++++++++++ 22/headless/al2023/Dockerfile | 24 ++++++++++ 22/jdk/al2-generic/Dockerfile | 32 +++++++++++++ 22/jdk/al2023/Dockerfile | 24 ++++++++++ 22/jdk/alpine/3.16/Dockerfile | 22 +++++++++ 22/jdk/alpine/3.17/Dockerfile | 22 +++++++++ 22/jdk/alpine/3.18/Dockerfile | 22 +++++++++ 22/jdk/alpine/3.19/Dockerfile | 22 +++++++++ 22/jdk/debian/Dockerfile | 26 +++++++++++ 22/slim/al2/Dockerfile | 67 ++++++++++++++++++++++++++++ 22/slim/alpine/Dockerfile | 29 ++++++++++++ 22/slim/debian/Dockerfile | 37 +++++++++++++++ bin/tag-generator.py | 2 +- bin/update-dockerfiles.sh | 8 +++- test/test-image-corretto22-jdk.yaml | 22 +++++++++ test/test-image-corretto22-jre.yaml | 17 +++++++ test/test-image-corretto22-slim.yaml | 22 +++++++++ versions.json | 3 +- 18 files changed, 422 insertions(+), 3 deletions(-) create mode 100644 22/headful/al2023/Dockerfile create mode 100644 22/headless/al2023/Dockerfile create mode 100644 22/jdk/al2-generic/Dockerfile create mode 100644 22/jdk/al2023/Dockerfile create mode 100644 22/jdk/alpine/3.16/Dockerfile create mode 100644 22/jdk/alpine/3.17/Dockerfile create mode 100644 22/jdk/alpine/3.18/Dockerfile create mode 100644 22/jdk/alpine/3.19/Dockerfile create mode 100644 22/jdk/debian/Dockerfile create mode 100644 22/slim/al2/Dockerfile create mode 100644 22/slim/alpine/Dockerfile create mode 100644 22/slim/debian/Dockerfile mode change 100644 => 100755 bin/tag-generator.py create mode 100644 test/test-image-corretto22-jdk.yaml create mode 100644 test/test-image-corretto22-jre.yaml create mode 100644 test/test-image-corretto22-slim.yaml diff --git a/22/headful/al2023/Dockerfile b/22/headful/al2023/Dockerfile new file mode 100644 index 00000000..1610e18c --- /dev/null +++ b/22/headful/al2023/Dockerfile @@ -0,0 +1,24 @@ +FROM amazonlinux:2023 + +ARG version=22.0.0.36-2 +ARG package_version=1 + +RUN set -eux \ + && rpm --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2023 \ + && echo "localpkg_gpgcheck=1" >> /etc/dnf/dnf.conf \ + && CORRETO_TEMP=$(mktemp -d) \ + && pushd ${CORRETO_TEMP} \ + && RPM_LIST=("java-22-amazon-corretto-headless-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-22-amazon-corretto-$version.amzn2023.${package_version}.$(uname -m).rpm") \ + && for rpm in ${RPM_LIST[@]}; do \ + curl --fail -O https://corretto.aws/downloads/resources/$(echo $version | tr '-' '.')/${rpm} \ + && rpm -K "${CORRETO_TEMP}/${rpm}" | grep -F "${CORRETO_TEMP}/${rpm}: digests signatures OK" || exit 1; \ + done \ + && dnf install -y ${CORRETO_TEMP}/*.rpm \ + && popd \ + && rm -rf /usr/lib/jvm/java-22-amazon-corretto.$(uname -m)/lib/src.zip \ + && rm -rf ${CORRETO_TEMP} \ + && dnf clean all \ + && sed -i '/localpkg_gpgcheck=1/d' /etc/dnf/dnf.conf + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/22/headless/al2023/Dockerfile b/22/headless/al2023/Dockerfile new file mode 100644 index 00000000..0ce03c96 --- /dev/null +++ b/22/headless/al2023/Dockerfile @@ -0,0 +1,24 @@ +FROM amazonlinux:2023 + +ARG version=22.0.0.36-2 +ARG package_version=1 + +RUN set -eux \ + && rpm --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2023 \ + && echo "localpkg_gpgcheck=1" >> /etc/dnf/dnf.conf \ + && CORRETO_TEMP=$(mktemp -d) \ + && pushd ${CORRETO_TEMP} \ + && RPM_LIST=("java-22-amazon-corretto-headless-$version.amzn2023.${package_version}.$(uname -m).rpm") \ + && for rpm in ${RPM_LIST[@]}; do \ + curl --fail -O https://corretto.aws/downloads/resources/$(echo $version | tr '-' '.')/${rpm} \ + && rpm -K "${CORRETO_TEMP}/${rpm}" | grep -F "${CORRETO_TEMP}/${rpm}: digests signatures OK" || exit 1; \ + done \ + && dnf install -y ${CORRETO_TEMP}/*.rpm \ + && popd \ + && rm -rf /usr/lib/jvm/java-22-amazon-corretto.$(uname -m)/lib/src.zip \ + && rm -rf ${CORRETO_TEMP} \ + && dnf clean all \ + && sed -i '/localpkg_gpgcheck=1/d' /etc/dnf/dnf.conf + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/22/jdk/al2-generic/Dockerfile b/22/jdk/al2-generic/Dockerfile new file mode 100644 index 00000000..1479c367 --- /dev/null +++ b/22/jdk/al2-generic/Dockerfile @@ -0,0 +1,32 @@ +FROM amazonlinux:2 + +ARG version=22.0.0.36-2 +# In addition to installing the Amazon corretto, we also install +# fontconfig. The folks who manage the docker hub's +# official image library have found that font management +# is a common usecase, and painpoint, and have +# recommended that Java images include font support. +# +# See: +# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java + +# The logic and code related to Fingerprint is contributed by @tianon in a Github PR's Conversation +# Comment = https://github.com/docker-library/official-images/pull/7459#issuecomment-592242757 +# PR = https://github.com/docker-library/official-images/pull/7459 +RUN set -eux \ + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fL -o corretto.key https://yum.corretto.aws/corretto.key \ + && gpg --batch --import corretto.key \ + && gpg --batch --export --armor '6DC3636DAE534049C8B94623A122542AB04F24E3' > corretto.key \ + && rpm --import corretto.key \ + && rm -r "$GNUPGHOME" corretto.key \ + && curl -fL -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \ + && grep -q '^gpgcheck=1' /etc/yum.repos.d/corretto.repo \ + && echo "priority=9" >> /etc/yum.repos.d/corretto.repo \ + && yum install -y java-22-amazon-corretto-devel-$version \ + && (find /usr/lib/jvm/java-22-amazon-corretto -name src.zip -delete || true) \ + && yum install -y fontconfig \ + && yum clean all + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/22/jdk/al2023/Dockerfile b/22/jdk/al2023/Dockerfile new file mode 100644 index 00000000..25db8c66 --- /dev/null +++ b/22/jdk/al2023/Dockerfile @@ -0,0 +1,24 @@ +FROM amazonlinux:2023 + +ARG version=22.0.0.36-2 +ARG package_version=1 + +RUN set -eux \ + && rpm --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2023 \ + && echo "localpkg_gpgcheck=1" >> /etc/dnf/dnf.conf \ + && CORRETO_TEMP=$(mktemp -d) \ + && pushd ${CORRETO_TEMP} \ + && RPM_LIST=("java-22-amazon-corretto-headless-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-22-amazon-corretto-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-22-amazon-corretto-devel-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-22-amazon-corretto-jmods-$version.amzn2023.${package_version}.$(uname -m).rpm") \ + && for rpm in ${RPM_LIST[@]}; do \ + curl --fail -O https://corretto.aws/downloads/resources/$(echo $version | tr '-' '.')/${rpm} \ + && rpm -K "${CORRETO_TEMP}/${rpm}" | grep -F "${CORRETO_TEMP}/${rpm}: digests signatures OK" || exit 1; \ + done \ + && dnf install -y ${CORRETO_TEMP}/*.rpm \ + && popd \ + && rm -rf /usr/lib/jvm/java-22-amazon-corretto.$(uname -m)/lib/src.zip \ + && rm -rf ${CORRETO_TEMP} \ + && dnf clean all \ + && sed -i '/localpkg_gpgcheck=1/d' /etc/dnf/dnf.conf + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/22/jdk/alpine/3.16/Dockerfile b/22/jdk/alpine/3.16/Dockerfile new file mode 100644 index 00000000..f1b09a3d --- /dev/null +++ b/22/jdk/alpine/3.16/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.16 + +ARG version=22.0.0.36-2 + +# Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. +# The Corretto team will update this file but you may see a few days' delay. +RUN wget -O /THIRD-PARTY-LICENSES-20200824.tar.gz https://corretto.aws/downloads/resources/licenses/alpine/THIRD-PARTY-LICENSES-20200824.tar.gz && \ + echo "82f3e50e71b2aee21321b2b33de372feed5befad6ef2196ddec92311bc09becb /THIRD-PARTY-LICENSES-20200824.tar.gz" | sha256sum -c - && \ + tar x -ovzf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + rm -rf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + wget -O /etc/apk/keys/amazoncorretto.rsa.pub https://apk.corretto.aws/amazoncorretto.rsa.pub && \ + SHA_SUM="6cfdf08be09f32ca298e2d5bd4a359ee2b275765c09b56d514624bf831eafb91" && \ + echo "${SHA_SUM} /etc/apk/keys/amazoncorretto.rsa.pub" | sha256sum -c - && \ + echo "https://apk.corretto.aws" >> /etc/apk/repositories && \ + apk add --no-cache amazon-corretto-22=$version-r0 && \ + rm -rf /usr/lib/jvm/java-22-amazon-corretto/lib/src.zip + + +ENV LANG C.UTF-8 + +ENV JAVA_HOME=/usr/lib/jvm/default-jvm +ENV PATH=$PATH:/usr/lib/jvm/default-jvm/bin diff --git a/22/jdk/alpine/3.17/Dockerfile b/22/jdk/alpine/3.17/Dockerfile new file mode 100644 index 00000000..96da1727 --- /dev/null +++ b/22/jdk/alpine/3.17/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.17 + +ARG version=22.0.0.36-2 + +# Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. +# The Corretto team will update this file but you may see a few days' delay. +RUN wget -O /THIRD-PARTY-LICENSES-20200824.tar.gz https://corretto.aws/downloads/resources/licenses/alpine/THIRD-PARTY-LICENSES-20200824.tar.gz && \ + echo "82f3e50e71b2aee21321b2b33de372feed5befad6ef2196ddec92311bc09becb /THIRD-PARTY-LICENSES-20200824.tar.gz" | sha256sum -c - && \ + tar x -ovzf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + rm -rf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + wget -O /etc/apk/keys/amazoncorretto.rsa.pub https://apk.corretto.aws/amazoncorretto.rsa.pub && \ + SHA_SUM="6cfdf08be09f32ca298e2d5bd4a359ee2b275765c09b56d514624bf831eafb91" && \ + echo "${SHA_SUM} /etc/apk/keys/amazoncorretto.rsa.pub" | sha256sum -c - && \ + echo "https://apk.corretto.aws" >> /etc/apk/repositories && \ + apk add --no-cache amazon-corretto-22=$version-r0 && \ + rm -rf /usr/lib/jvm/java-22-amazon-corretto/lib/src.zip + + +ENV LANG C.UTF-8 + +ENV JAVA_HOME=/usr/lib/jvm/default-jvm +ENV PATH=$PATH:/usr/lib/jvm/default-jvm/bin diff --git a/22/jdk/alpine/3.18/Dockerfile b/22/jdk/alpine/3.18/Dockerfile new file mode 100644 index 00000000..96322047 --- /dev/null +++ b/22/jdk/alpine/3.18/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.18 + +ARG version=22.0.0.36-2 + +# Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. +# The Corretto team will update this file but you may see a few days' delay. +RUN wget -O /THIRD-PARTY-LICENSES-20200824.tar.gz https://corretto.aws/downloads/resources/licenses/alpine/THIRD-PARTY-LICENSES-20200824.tar.gz && \ + echo "82f3e50e71b2aee21321b2b33de372feed5befad6ef2196ddec92311bc09becb /THIRD-PARTY-LICENSES-20200824.tar.gz" | sha256sum -c - && \ + tar x -ovzf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + rm -rf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + wget -O /etc/apk/keys/amazoncorretto.rsa.pub https://apk.corretto.aws/amazoncorretto.rsa.pub && \ + SHA_SUM="6cfdf08be09f32ca298e2d5bd4a359ee2b275765c09b56d514624bf831eafb91" && \ + echo "${SHA_SUM} /etc/apk/keys/amazoncorretto.rsa.pub" | sha256sum -c - && \ + echo "https://apk.corretto.aws" >> /etc/apk/repositories && \ + apk add --no-cache amazon-corretto-22=$version-r0 && \ + rm -rf /usr/lib/jvm/java-22-amazon-corretto/lib/src.zip + + +ENV LANG C.UTF-8 + +ENV JAVA_HOME=/usr/lib/jvm/default-jvm +ENV PATH=$PATH:/usr/lib/jvm/default-jvm/bin diff --git a/22/jdk/alpine/3.19/Dockerfile b/22/jdk/alpine/3.19/Dockerfile new file mode 100644 index 00000000..b8ca3f50 --- /dev/null +++ b/22/jdk/alpine/3.19/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.19 + +ARG version=22.0.0.36-2 + +# Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. +# The Corretto team will update this file but you may see a few days' delay. +RUN wget -O /THIRD-PARTY-LICENSES-20200824.tar.gz https://corretto.aws/downloads/resources/licenses/alpine/THIRD-PARTY-LICENSES-20200824.tar.gz && \ + echo "82f3e50e71b2aee21321b2b33de372feed5befad6ef2196ddec92311bc09becb /THIRD-PARTY-LICENSES-20200824.tar.gz" | sha256sum -c - && \ + tar x -ovzf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + rm -rf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + wget -O /etc/apk/keys/amazoncorretto.rsa.pub https://apk.corretto.aws/amazoncorretto.rsa.pub && \ + SHA_SUM="6cfdf08be09f32ca298e2d5bd4a359ee2b275765c09b56d514624bf831eafb91" && \ + echo "${SHA_SUM} /etc/apk/keys/amazoncorretto.rsa.pub" | sha256sum -c - && \ + echo "https://apk.corretto.aws" >> /etc/apk/repositories && \ + apk add --no-cache amazon-corretto-22=$version-r0 && \ + rm -rf /usr/lib/jvm/java-22-amazon-corretto/lib/src.zip + + +ENV LANG C.UTF-8 + +ENV JAVA_HOME=/usr/lib/jvm/default-jvm +ENV PATH=$PATH:/usr/lib/jvm/default-jvm/bin diff --git a/22/jdk/debian/Dockerfile b/22/jdk/debian/Dockerfile new file mode 100644 index 00000000..ca67c9e2 --- /dev/null +++ b/22/jdk/debian/Dockerfile @@ -0,0 +1,26 @@ +FROM debian:buster-slim + +ARG version=22.0.0.36-2 +# In addition to installing the Amazon corretto, we also install +# fontconfig. The folks who manage the docker hub's +# official image library have found that font management +# is a common usecase, and painpoint, and have +# recommended that Java images include font support. +# +# See: +# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java + +RUN set -eux \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ + curl ca-certificates gnupg software-properties-common fontconfig java-common \ + && curl -fL https://apt.corretto.aws/corretto.key | apt-key add - \ + && add-apt-repository 'deb https://apt.corretto.aws stable main' \ + && mkdir -p /usr/share/man/man1 || true \ + && apt-get update \ + && apt-get install -y java-22-amazon-corretto-jdk=1:$version \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + curl gnupg software-properties-common + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/22/slim/al2/Dockerfile b/22/slim/al2/Dockerfile new file mode 100644 index 00000000..d1e61359 --- /dev/null +++ b/22/slim/al2/Dockerfile @@ -0,0 +1,67 @@ +FROM amazonlinux:2 + +ARG version=22.0.0.36-2 +# In addition to installing the Amazon corretto, we also install +# fontconfig. The folks who manage the docker hub's +# official image library have found that font management +# is a common usecase, and painpoint, and have +# recommended that Java images include font support. +# +# See: +# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java + +# The logic and code related to Fingerprint is contributed by @tianon in a Github PR's Conversation +# Comment = https://github.com/docker-library/official-images/pull/7459#issuecomment-592242757 +# PR = https://github.com/docker-library/official-images/pull/7459 +# +# Slim: +# JLink is used (retaining all modules) to create a slimmer version of the JDK excluding man-pages, header files and debugging symbols - saving ~113MB. +RUN set -eux \ + && export GNUPGHOME="$(mktemp -d)" \ + && curl -fL -o corretto.key https://yum.corretto.aws/corretto.key \ + && gpg --batch --import corretto.key \ + && gpg --batch --export --armor '6DC3636DAE534049C8B94623A122542AB04F24E3' > corretto.key \ + && rpm --import corretto.key \ + && rm -r "$GNUPGHOME" corretto.key \ + && curl -fL -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \ + && grep -q '^gpgcheck=1' /etc/yum.repos.d/corretto.repo \ + && echo "priority=9" >> /etc/yum.repos.d/corretto.repo \ + && yum install -y java-22-amazon-corretto-devel-$version \ + && (find /usr/lib/jvm/java-22-amazon-corretto -name src.zip -delete || true) \ + && yum install -y fontconfig \ + && yum install -y binutils \ + && jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \ + && yum remove -y binutils java-22-amazon-corretto-devel-$version \ + && mkdir -p /usr/lib/jvm/ \ + && mv /opt/corretto-slim /usr/lib/jvm/java-22-amazon-corretto \ + && alternatives --install /usr/bin/java java /usr/lib/jvm/java-22-amazon-corretto/bin/java $(echo "1${version}" | sed "s/\(\.\|-\)//g") \ + --slave /usr/bin/keytool keytool /usr/lib/jvm/java-22-amazon-corretto/bin/keytool \ + --slave /usr/bin/rmid rmid /usr/lib/jvm/java-22-amazon-corretto/bin/rmid \ + --slave /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/java-22-amazon-corretto/bin/rmiregistry \ + && alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-22-amazon-corretto/bin/javac $(echo "1${version}" | sed "s/\(\.\|-\)//g") \ + --slave /usr/bin/jaotc jaotc /usr/lib/jvm/java-22-amazon-corretto/bin/jaotc \ + --slave /usr/bin/jlink jlink /usr/lib/jvm/java-22-amazon-corretto/bin/jlink \ + --slave /usr/bin/jmod jmod /usr/lib/jvm/java-22-amazon-corretto/bin/jmod \ + --slave /usr/bin/jhsdb jhsdb /usr/lib/jvm/java-22-amazon-corretto/bin/jhsdb \ + --slave /usr/bin/jar jar /usr/lib/jvm/java-22-amazon-corretto/bin/jar \ + --slave /usr/bin/jarsigner jarsigner /usr/lib/jvm/java-22-amazon-corretto/bin/jarsigner \ + --slave /usr/bin/javadoc javadoc /usr/lib/jvm/java-22-amazon-corretto/bin/javadoc \ + --slave /usr/bin/javap javap /usr/lib/jvm/java-22-amazon-corretto/bin/javap \ + --slave /usr/bin/jcmd jcmd /usr/lib/jvm/java-22-amazon-corretto/bin/jcmd \ + --slave /usr/bin/jconsole jconsole /usr/lib/jvm/java-22-amazon-corretto/bin/jconsole \ + --slave /usr/bin/jdb jdb /usr/lib/jvm/java-22-amazon-corretto/bin/jdb \ + --slave /usr/bin/jdeps jdeps /usr/lib/jvm/java-22-amazon-corretto/bin/jdeps \ + --slave /usr/bin/jdeprscan jdeprscan /usr/lib/jvm/java-22-amazon-corretto/bin/jdeprscan \ + --slave /usr/bin/jimage jimage /usr/lib/jvm/java-22-amazon-corretto/bin/jimage \ + --slave /usr/bin/jinfo jinfo /usr/lib/jvm/java-22-amazon-corretto/bin/jinfo \ + --slave /usr/bin/jmap jmap /usr/lib/jvm/java-22-amazon-corretto/bin/jmap \ + --slave /usr/bin/jps jps /usr/lib/jvm/java-22-amazon-corretto/bin/jps \ + --slave /usr/bin/jrunscript jrunscript /usr/lib/jvm/java-22-amazon-corretto/bin/jrunscript \ + --slave /usr/bin/jshell jshell /usr/lib/jvm/java-22-amazon-corretto/bin/jshell \ + --slave /usr/bin/jstack jstack /usr/lib/jvm/java-22-amazon-corretto/bin/jstack \ + --slave /usr/bin/jstat jstat /usr/lib/jvm/java-22-amazon-corretto/bin/jstat \ + --slave /usr/bin/jstatd jstatd /usr/lib/jvm/java-22-amazon-corretto/bin/jstatd \ + && yum clean all + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/22/slim/alpine/Dockerfile b/22/slim/alpine/Dockerfile new file mode 100644 index 00000000..06bfeb18 --- /dev/null +++ b/22/slim/alpine/Dockerfile @@ -0,0 +1,29 @@ +FROM alpine:3.17 + +ARG version=22.0.0.36.2 + +# Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. +# The Corretto team will update this file but you may see a few days' delay. +# +# Slim: +# JLink is used (retaining all modules) to create a slimmer version of the JDK excluding man-pages, header files and debugging symbols - saving ~113MB. +RUN wget -O /THIRD-PARTY-LICENSES-20200824.tar.gz https://corretto.aws/downloads/resources/licenses/alpine/THIRD-PARTY-LICENSES-20200824.tar.gz && \ + echo "82f3e50e71b2aee21321b2b33de372feed5befad6ef2196ddec92311bc09becb /THIRD-PARTY-LICENSES-20200824.tar.gz" | sha256sum -c - && \ + tar x -ovzf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + rm -rf THIRD-PARTY-LICENSES-20200824.tar.gz && \ + wget -O /etc/apk/keys/amazoncorretto.rsa.pub https://apk.corretto.aws/amazoncorretto.rsa.pub && \ + SHA_SUM="6cfdf08be09f32ca298e2d5bd4a359ee2b275765c09b56d514624bf831eafb91" && \ + echo "${SHA_SUM} /etc/apk/keys/amazoncorretto.rsa.pub" | sha256sum -c - && \ + echo "https://apk.corretto.aws" >> /etc/apk/repositories && \ + apk add --no-cache amazon-corretto-22=$version-r0 binutils && \ + /usr/lib/jvm/default-jvm/bin/jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim && \ + apk del binutils amazon-corretto-22 && \ + mkdir -p /usr/lib/jvm/ && \ + mv /opt/corretto-slim /usr/lib/jvm/java-22-amazon-corretto && \ + ln -sfn /usr/lib/jvm/java-22-amazon-corretto /usr/lib/jvm/default-jvm + + + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/default-jvm +ENV PATH=$PATH:/usr/lib/jvm/default-jvm/bin diff --git a/22/slim/debian/Dockerfile b/22/slim/debian/Dockerfile new file mode 100644 index 00000000..9d31eabb --- /dev/null +++ b/22/slim/debian/Dockerfile @@ -0,0 +1,37 @@ +FROM debian:buster-slim + +ARG version=22.0.0.36-2 +# In addition to installing the Amazon corretto, we also install +# fontconfig. The folks who manage the docker hub's +# official image library have found that font management +# is a common usecase, and painpoint, and have +# recommended that Java images include font support. +# +# See: +# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java +# +# Slim: +# JLink is used (retaining all modules) to create a slimmer version of the JDK excluding man-pages, header files and debugging symbols - saving ~113MB. +RUN set -ux \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ + curl ca-certificates gnupg software-properties-common fontconfig \ + && curl -fL https://apt.corretto.aws/corretto.key | apt-key add - \ + && add-apt-repository 'deb https://apt.corretto.aws stable main' \ + && mkdir -p /usr/share/man/man1 \ + && apt-get update \ + && apt-get install -y java-22-amazon-corretto-jdk=1:$version binutils \ + && jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \ + && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ + curl gnupg software-properties-common binutils java-22-amazon-corretto-jdk=1:$version \ + && mkdir -p /usr/lib/jvm \ + && mv /opt/corretto-slim /usr/lib/jvm/java-22-amazon-corretto \ + && jdk_tools="java keytool rmid rmiregistry javac jaotc jlink jmod jhsdb jar jarsigner javadoc javap jcmd jconsole jdb jdeps jdeprscan jimage jinfo jmap jps jrunscript jshell jstack jstat jstatd serialver" \ + && priority=$(echo "1${version}" | sed "s/\(\.\|-\)//g") \ + && for i in ${jdk_tools}; do \ + update-alternatives --install /usr/bin/$i $i /usr/lib/jvm/java-22-amazon-corretto/bin/$i ${priority}; \ + done + + +ENV LANG C.UTF-8 +ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/bin/tag-generator.py b/bin/tag-generator.py old mode 100644 new mode 100755 index a4aa9581..fe38e7e8 --- a/bin/tag-generator.py +++ b/bin/tag-generator.py @@ -3,7 +3,7 @@ DEFAULT_ALPINE_VERSION = '3.19' ALPINE_VERSIONS = ['3.16', '3.17', '3.18', '3.19'] -LTS_VERSIONS = [ "8", "11", "17", "21"] +LTS_VERSIONS = [ "8", "11", "17", "21", "22"] AL2023_GENERIC_VERSIONS = ["20"] def generate_tags(key, version): diff --git a/bin/update-dockerfiles.sh b/bin/update-dockerfiles.sh index 916d9648..d4b30290 100755 --- a/bin/update-dockerfiles.sh +++ b/bin/update-dockerfiles.sh @@ -4,7 +4,7 @@ SED="sed -i" sed --version 2>/dev/null || SED="sed -i.bkp" -LTS_VERSIONS=("8" "11" "17" "21") +LTS_VERSIONS=("8" "11" "17" "21" "22") usage() { echo "usage: update-dockerfiles.sh [--help]" @@ -104,6 +104,7 @@ CORRETTO_8_GENERIC_LINUX=$(cat versions.json | jq -r '.["8"]' ) CORRETTO_11_GENERIC_LINUX=$(cat versions.json | jq -r '.["11"]' ) CORRETTO_17_GENERIC_LINUX=$(cat versions.json | jq -r '.["17"]' ) CORRETTO_21_GENERIC_LINUX=$(cat versions.json | jq -r '.["21"]' ) +CORRETTO_22_GENERIC_LINUX=$(cat versions.json | jq -r '.["22"]' ) if [ ! -z "${CORRETTO_11_GENERIC_LINUX}" ]; then update_generic_linux ${CORRETTO_11_GENERIC_LINUX} 11 @@ -117,6 +118,10 @@ if [ ! -z "${CORRETTO_21_GENERIC_LINUX}" ]; then update_generic_linux ${CORRETTO_21_GENERIC_LINUX} 21 fi +if [ ! -z "${CORRETTO_22_GENERIC_LINUX}" ]; then + update_generic_linux ${CORRETTO_22_GENERIC_LINUX} 22 +fi + if [ ! -z "${CORRETTO_8_GENERIC_LINUX}" ]; then jdk_version=$(echo ${CORRETTO_8_GENERIC_LINUX} | cut -d'.' -f2) jdk_build=$(echo ${CORRETTO_8_GENERIC_LINUX} | cut -d'.' -f3) @@ -142,3 +147,4 @@ verify_update 8 ${jdk_version} verify_update 11 ${CORRETTO_11_GENERIC_LINUX} verify_update 17 ${CORRETTO_17_GENERIC_LINUX} verify_update 21 ${CORRETTO_21_GENERIC_LINUX} +verify_update 22 ${CORRETTO_22_GENERIC_LINUX} diff --git a/test/test-image-corretto22-jdk.yaml b/test/test-image-corretto22-jdk.yaml new file mode 100644 index 00000000..d7911337 --- /dev/null +++ b/test/test-image-corretto22-jdk.yaml @@ -0,0 +1,22 @@ +schemaVersion: "2.0.0" + +metadataTest: + envVars: + - key: LANG + value: C.UTF-8 + +commandTests: + - name: "java command is registered using alternatives." + command: "java" + args: ["-version"] + expectedError: ["OpenJDK Runtime Environment Corretto-22.*"] + + - name: "javac command is registered using alternatives." + command: "javac" + args: ["-version"] + expectedOutput: ["javac 22*"] + + - name: "JAVA_HOME points to the correct directory." + command: "$JAVA_HOME/bin/java" + args: ["-version"] + expectedError: ["OpenJDK Runtime Environment Corretto-22.*"] diff --git a/test/test-image-corretto22-jre.yaml b/test/test-image-corretto22-jre.yaml new file mode 100644 index 00000000..bd6d30cf --- /dev/null +++ b/test/test-image-corretto22-jre.yaml @@ -0,0 +1,17 @@ +schemaVersion: "2.0.0" + +metadataTest: + envVars: + - key: LANG + value: C.UTF-8 + +commandTests: + - name: "java command is registered using alternatives." + command: "java" + args: ["-version"] + expectedError: ["OpenJDK Runtime Environment Corretto-22.*"] + + - name: "JAVA_HOME points to the correct directory." + command: "$JAVA_HOME/bin/java" + args: ["-version"] + expectedError: ["OpenJDK Runtime Environment Corretto-22.*"] \ No newline at end of file diff --git a/test/test-image-corretto22-slim.yaml b/test/test-image-corretto22-slim.yaml new file mode 100644 index 00000000..d7911337 --- /dev/null +++ b/test/test-image-corretto22-slim.yaml @@ -0,0 +1,22 @@ +schemaVersion: "2.0.0" + +metadataTest: + envVars: + - key: LANG + value: C.UTF-8 + +commandTests: + - name: "java command is registered using alternatives." + command: "java" + args: ["-version"] + expectedError: ["OpenJDK Runtime Environment Corretto-22.*"] + + - name: "javac command is registered using alternatives." + command: "javac" + args: ["-version"] + expectedOutput: ["javac 22*"] + + - name: "JAVA_HOME points to the correct directory." + command: "$JAVA_HOME/bin/java" + args: ["-version"] + expectedError: ["OpenJDK Runtime Environment Corretto-22.*"] diff --git a/versions.json b/versions.json index d518ea43..6f675b2a 100644 --- a/versions.json +++ b/versions.json @@ -2,6 +2,7 @@ "8" : "8.402.08.1", "11" : "11.0.22.7.1", "17" : "17.0.10.7.1", - "21" : "21.0.2.14.1" + "21" : "21.0.2.14.1", + "22" : "22.0.0.36.2" } From c686b1523eef5deff4da9ba8eb988c1e5a651369 Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Tue, 19 Mar 2024 20:33:24 +0000 Subject: [PATCH 02/11] remove al2 from 22 --- .github/workflows/verify-images.yml | 6 +++--- 22/jdk/al2-generic/Dockerfile | 32 ----------------------------- 2 files changed, 3 insertions(+), 35 deletions(-) delete mode 100644 22/jdk/al2-generic/Dockerfile diff --git a/.github/workflows/verify-images.yml b/.github/workflows/verify-images.yml index b23e3ab4..3bea684e 100644 --- a/.github/workflows/verify-images.yml +++ b/.github/workflows/verify-images.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - version: [ 17, 21 ] + version: [ 17, 21, 22 ] package: [ slim ] platform: [ al2, alpine, debian ] steps: @@ -54,7 +54,7 @@ jobs: strategy: fail-fast: false matrix: - version: [ 11, 17, 21 ] + version: [ 11, 17, 21, 22 ] package: [ jdk, headful, headless ] platform: [ al2023 ] steps: @@ -69,7 +69,7 @@ jobs: strategy: fail-fast: false matrix: - version: [ 8, 11, 17, 21 ] + version: [ 8, 11, 17, 21, 22 ] os_version: ["3.16", "3.17", "3.18", "3.19"] steps: - name: Checkout code diff --git a/22/jdk/al2-generic/Dockerfile b/22/jdk/al2-generic/Dockerfile deleted file mode 100644 index 1479c367..00000000 --- a/22/jdk/al2-generic/Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -FROM amazonlinux:2 - -ARG version=22.0.0.36-2 -# In addition to installing the Amazon corretto, we also install -# fontconfig. The folks who manage the docker hub's -# official image library have found that font management -# is a common usecase, and painpoint, and have -# recommended that Java images include font support. -# -# See: -# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java - -# The logic and code related to Fingerprint is contributed by @tianon in a Github PR's Conversation -# Comment = https://github.com/docker-library/official-images/pull/7459#issuecomment-592242757 -# PR = https://github.com/docker-library/official-images/pull/7459 -RUN set -eux \ - && export GNUPGHOME="$(mktemp -d)" \ - && curl -fL -o corretto.key https://yum.corretto.aws/corretto.key \ - && gpg --batch --import corretto.key \ - && gpg --batch --export --armor '6DC3636DAE534049C8B94623A122542AB04F24E3' > corretto.key \ - && rpm --import corretto.key \ - && rm -r "$GNUPGHOME" corretto.key \ - && curl -fL -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \ - && grep -q '^gpgcheck=1' /etc/yum.repos.d/corretto.repo \ - && echo "priority=9" >> /etc/yum.repos.d/corretto.repo \ - && yum install -y java-22-amazon-corretto-devel-$version \ - && (find /usr/lib/jvm/java-22-amazon-corretto -name src.zip -delete || true) \ - && yum install -y fontconfig \ - && yum clean all - -ENV LANG C.UTF-8 -ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto From 288173e6371744d8ab7b1decfd1ebc28c21d4ae8 Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Tue, 19 Mar 2024 23:51:58 +0000 Subject: [PATCH 03/11] Run template --- 22/jdk/alpine/3.16/Dockerfile | 2 +- 22/jdk/alpine/3.17/Dockerfile | 2 +- 22/jdk/alpine/3.18/Dockerfile | 2 +- 22/jdk/alpine/3.19/Dockerfile | 2 +- bin/apply-template.py | 0 5 files changed, 4 insertions(+), 4 deletions(-) mode change 100644 => 100755 bin/apply-template.py diff --git a/22/jdk/alpine/3.16/Dockerfile b/22/jdk/alpine/3.16/Dockerfile index f1b09a3d..f8f13844 100644 --- a/22/jdk/alpine/3.16/Dockerfile +++ b/22/jdk/alpine/3.16/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.16 -ARG version=22.0.0.36-2 +ARG version=22.0.0.36.2 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/jdk/alpine/3.17/Dockerfile b/22/jdk/alpine/3.17/Dockerfile index 96da1727..701a53a0 100644 --- a/22/jdk/alpine/3.17/Dockerfile +++ b/22/jdk/alpine/3.17/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.17 -ARG version=22.0.0.36-2 +ARG version=22.0.0.36.2 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/jdk/alpine/3.18/Dockerfile b/22/jdk/alpine/3.18/Dockerfile index 96322047..181d3c88 100644 --- a/22/jdk/alpine/3.18/Dockerfile +++ b/22/jdk/alpine/3.18/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.18 -ARG version=22.0.0.36-2 +ARG version=22.0.0.36.2 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/jdk/alpine/3.19/Dockerfile b/22/jdk/alpine/3.19/Dockerfile index b8ca3f50..5c77116e 100644 --- a/22/jdk/alpine/3.19/Dockerfile +++ b/22/jdk/alpine/3.19/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.19 -ARG version=22.0.0.36-2 +ARG version=22.0.0.36.2 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/bin/apply-template.py b/bin/apply-template.py old mode 100644 new mode 100755 From 489efc4221db020acbd0a57af43ed3f085be6135 Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Wed, 20 Mar 2024 00:02:31 +0000 Subject: [PATCH 04/11] Remove 22 --- bin/tag-generator.py | 2 +- bin/update-dockerfiles.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tag-generator.py b/bin/tag-generator.py index fe38e7e8..a4aa9581 100755 --- a/bin/tag-generator.py +++ b/bin/tag-generator.py @@ -3,7 +3,7 @@ DEFAULT_ALPINE_VERSION = '3.19' ALPINE_VERSIONS = ['3.16', '3.17', '3.18', '3.19'] -LTS_VERSIONS = [ "8", "11", "17", "21", "22"] +LTS_VERSIONS = [ "8", "11", "17", "21"] AL2023_GENERIC_VERSIONS = ["20"] def generate_tags(key, version): diff --git a/bin/update-dockerfiles.sh b/bin/update-dockerfiles.sh index d4b30290..a7f61079 100755 --- a/bin/update-dockerfiles.sh +++ b/bin/update-dockerfiles.sh @@ -4,7 +4,7 @@ SED="sed -i" sed --version 2>/dev/null || SED="sed -i.bkp" -LTS_VERSIONS=("8" "11" "17" "21" "22") +LTS_VERSIONS=("8" "11" "17" "21") usage() { echo "usage: update-dockerfiles.sh [--help]" From a0b4a19d97a68e3b848977c698f7487497a1d73d Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Wed, 20 Mar 2024 00:09:26 +0000 Subject: [PATCH 05/11] Remove al2 slim and install zlib1g --- 22/slim/al2/Dockerfile | 67 --------------------------------------- 22/slim/debian/Dockerfile | 1 + 2 files changed, 1 insertion(+), 67 deletions(-) delete mode 100644 22/slim/al2/Dockerfile diff --git a/22/slim/al2/Dockerfile b/22/slim/al2/Dockerfile deleted file mode 100644 index d1e61359..00000000 --- a/22/slim/al2/Dockerfile +++ /dev/null @@ -1,67 +0,0 @@ -FROM amazonlinux:2 - -ARG version=22.0.0.36-2 -# In addition to installing the Amazon corretto, we also install -# fontconfig. The folks who manage the docker hub's -# official image library have found that font management -# is a common usecase, and painpoint, and have -# recommended that Java images include font support. -# -# See: -# https://github.com/docker-library/official-images/blob/master/test/tests/java-uimanager-font/container.java - -# The logic and code related to Fingerprint is contributed by @tianon in a Github PR's Conversation -# Comment = https://github.com/docker-library/official-images/pull/7459#issuecomment-592242757 -# PR = https://github.com/docker-library/official-images/pull/7459 -# -# Slim: -# JLink is used (retaining all modules) to create a slimmer version of the JDK excluding man-pages, header files and debugging symbols - saving ~113MB. -RUN set -eux \ - && export GNUPGHOME="$(mktemp -d)" \ - && curl -fL -o corretto.key https://yum.corretto.aws/corretto.key \ - && gpg --batch --import corretto.key \ - && gpg --batch --export --armor '6DC3636DAE534049C8B94623A122542AB04F24E3' > corretto.key \ - && rpm --import corretto.key \ - && rm -r "$GNUPGHOME" corretto.key \ - && curl -fL -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \ - && grep -q '^gpgcheck=1' /etc/yum.repos.d/corretto.repo \ - && echo "priority=9" >> /etc/yum.repos.d/corretto.repo \ - && yum install -y java-22-amazon-corretto-devel-$version \ - && (find /usr/lib/jvm/java-22-amazon-corretto -name src.zip -delete || true) \ - && yum install -y fontconfig \ - && yum install -y binutils \ - && jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \ - && yum remove -y binutils java-22-amazon-corretto-devel-$version \ - && mkdir -p /usr/lib/jvm/ \ - && mv /opt/corretto-slim /usr/lib/jvm/java-22-amazon-corretto \ - && alternatives --install /usr/bin/java java /usr/lib/jvm/java-22-amazon-corretto/bin/java $(echo "1${version}" | sed "s/\(\.\|-\)//g") \ - --slave /usr/bin/keytool keytool /usr/lib/jvm/java-22-amazon-corretto/bin/keytool \ - --slave /usr/bin/rmid rmid /usr/lib/jvm/java-22-amazon-corretto/bin/rmid \ - --slave /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/java-22-amazon-corretto/bin/rmiregistry \ - && alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-22-amazon-corretto/bin/javac $(echo "1${version}" | sed "s/\(\.\|-\)//g") \ - --slave /usr/bin/jaotc jaotc /usr/lib/jvm/java-22-amazon-corretto/bin/jaotc \ - --slave /usr/bin/jlink jlink /usr/lib/jvm/java-22-amazon-corretto/bin/jlink \ - --slave /usr/bin/jmod jmod /usr/lib/jvm/java-22-amazon-corretto/bin/jmod \ - --slave /usr/bin/jhsdb jhsdb /usr/lib/jvm/java-22-amazon-corretto/bin/jhsdb \ - --slave /usr/bin/jar jar /usr/lib/jvm/java-22-amazon-corretto/bin/jar \ - --slave /usr/bin/jarsigner jarsigner /usr/lib/jvm/java-22-amazon-corretto/bin/jarsigner \ - --slave /usr/bin/javadoc javadoc /usr/lib/jvm/java-22-amazon-corretto/bin/javadoc \ - --slave /usr/bin/javap javap /usr/lib/jvm/java-22-amazon-corretto/bin/javap \ - --slave /usr/bin/jcmd jcmd /usr/lib/jvm/java-22-amazon-corretto/bin/jcmd \ - --slave /usr/bin/jconsole jconsole /usr/lib/jvm/java-22-amazon-corretto/bin/jconsole \ - --slave /usr/bin/jdb jdb /usr/lib/jvm/java-22-amazon-corretto/bin/jdb \ - --slave /usr/bin/jdeps jdeps /usr/lib/jvm/java-22-amazon-corretto/bin/jdeps \ - --slave /usr/bin/jdeprscan jdeprscan /usr/lib/jvm/java-22-amazon-corretto/bin/jdeprscan \ - --slave /usr/bin/jimage jimage /usr/lib/jvm/java-22-amazon-corretto/bin/jimage \ - --slave /usr/bin/jinfo jinfo /usr/lib/jvm/java-22-amazon-corretto/bin/jinfo \ - --slave /usr/bin/jmap jmap /usr/lib/jvm/java-22-amazon-corretto/bin/jmap \ - --slave /usr/bin/jps jps /usr/lib/jvm/java-22-amazon-corretto/bin/jps \ - --slave /usr/bin/jrunscript jrunscript /usr/lib/jvm/java-22-amazon-corretto/bin/jrunscript \ - --slave /usr/bin/jshell jshell /usr/lib/jvm/java-22-amazon-corretto/bin/jshell \ - --slave /usr/bin/jstack jstack /usr/lib/jvm/java-22-amazon-corretto/bin/jstack \ - --slave /usr/bin/jstat jstat /usr/lib/jvm/java-22-amazon-corretto/bin/jstat \ - --slave /usr/bin/jstatd jstatd /usr/lib/jvm/java-22-amazon-corretto/bin/jstatd \ - && yum clean all - -ENV LANG C.UTF-8 -ENV JAVA_HOME=/usr/lib/jvm/java-22-amazon-corretto diff --git a/22/slim/debian/Dockerfile b/22/slim/debian/Dockerfile index 9d31eabb..823fc410 100644 --- a/22/slim/debian/Dockerfile +++ b/22/slim/debian/Dockerfile @@ -20,6 +20,7 @@ RUN set -ux \ && add-apt-repository 'deb https://apt.corretto.aws stable main' \ && mkdir -p /usr/share/man/man1 \ && apt-get update \ + && apt-get install zlib1g \ && apt-get install -y java-22-amazon-corretto-jdk=1:$version binutils \ && jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ From e7b06aa018456d74bc088b287890170a25c30328 Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Wed, 20 Mar 2024 00:17:58 +0000 Subject: [PATCH 06/11] update image verification --- .github/workflows/verify-images.yml | 31 ++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/verify-images.yml b/.github/workflows/verify-images.yml index 3bea684e..405386d4 100644 --- a/.github/workflows/verify-images.yml +++ b/.github/workflows/verify-images.yml @@ -17,6 +17,20 @@ jobs: uses: actions/checkout@v2 - name: Test Corretto ${{ matrix.version }} ${{ matrix.package }} package on ${{ matrix.platform }} run: ./bin/test-image.sh "${{ matrix.version }}/${{ matrix.package }}/${{ matrix.platform }}/Dockerfile" ${{ matrix.version }} ${{ matrix.package }} + verify-corretto-22: + name: Verify Corretto 22 JDK Images + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [ 22 ] + package: [ jdk ] + platform: [ debian ] + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Test Corretto ${{ matrix.version }} ${{ matrix.package }} package on ${{ matrix.platform }} + run: ./bin/test-image.sh "${{ matrix.version }}/${{ matrix.package }}/${{ matrix.platform }}/Dockerfile" ${{ matrix.version }} ${{ matrix.package }} verify-corretto-slim: name: Verify Corretto Slim Images @@ -24,7 +38,7 @@ jobs: strategy: fail-fast: false matrix: - version: [ 17, 21, 22 ] + version: [ 17, 21 ] package: [ slim ] platform: [ al2, alpine, debian ] steps: @@ -33,6 +47,21 @@ jobs: - name: Test Corretto ${{ matrix.version }} ${{ matrix.package }} package on ${{ matrix.platform }} run: ./bin/test-image.sh "${{ matrix.version }}/${{ matrix.package }}/${{ matrix.platform }}/Dockerfile" ${{ matrix.version }} ${{ matrix.package }} + verify-corretto-slim-22: + name: Verify Corretto Slim Images + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: [ 22 ] + package: [ slim ] + platform: [ alpine, debian ] + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Test Corretto ${{ matrix.version }} ${{ matrix.package }} package on ${{ matrix.platform }} + run: ./bin/test-image.sh "${{ matrix.version }}/${{ matrix.package }}/${{ matrix.platform }}/Dockerfile" ${{ matrix.version }} ${{ matrix.package }} + verify-corretto-8-on-al: name: Verify Corretto 8 Images on AL2/2023 runs-on: ubuntu-latest From 8c5815e1bb29fddab5376ef711612e628d9bc55d Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Tue, 19 Mar 2024 17:28:38 -0700 Subject: [PATCH 07/11] Update verify-images.yml --- .github/workflows/verify-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/verify-images.yml b/.github/workflows/verify-images.yml index 405386d4..50b3627d 100644 --- a/.github/workflows/verify-images.yml +++ b/.github/workflows/verify-images.yml @@ -17,6 +17,7 @@ jobs: uses: actions/checkout@v2 - name: Test Corretto ${{ matrix.version }} ${{ matrix.package }} package on ${{ matrix.platform }} run: ./bin/test-image.sh "${{ matrix.version }}/${{ matrix.package }}/${{ matrix.platform }}/Dockerfile" ${{ matrix.version }} ${{ matrix.package }} + verify-corretto-22: name: Verify Corretto 22 JDK Images runs-on: ubuntu-latest From f519f723eee31c8efa6b6d0b34dbb67dfaad3f6a Mon Sep 17 00:00:00 2001 From: Sergey Bylokhov Date: Tue, 19 Mar 2024 17:31:16 -0700 Subject: [PATCH 08/11] Update verify-images.yml --- .github/workflows/verify-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/verify-images.yml b/.github/workflows/verify-images.yml index 50b3627d..6cbdf047 100644 --- a/.github/workflows/verify-images.yml +++ b/.github/workflows/verify-images.yml @@ -27,7 +27,7 @@ jobs: version: [ 22 ] package: [ jdk ] platform: [ debian ] - steps: + steps: - name: Checkout code uses: actions/checkout@v2 - name: Test Corretto ${{ matrix.version }} ${{ matrix.package }} package on ${{ matrix.platform }} From d568cb688b153100adff20dbb4b834168fe3cc83 Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Wed, 20 Mar 2024 00:59:20 +0000 Subject: [PATCH 09/11] update image verification --- 22/slim/debian/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/22/slim/debian/Dockerfile b/22/slim/debian/Dockerfile index 823fc410..633002a5 100644 --- a/22/slim/debian/Dockerfile +++ b/22/slim/debian/Dockerfile @@ -20,7 +20,7 @@ RUN set -ux \ && add-apt-repository 'deb https://apt.corretto.aws stable main' \ && mkdir -p /usr/share/man/man1 \ && apt-get update \ - && apt-get install zlib1g \ + && apt-get install zlib1g-dev \ && apt-get install -y java-22-amazon-corretto-jdk=1:$version binutils \ && jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ From 59225d0b92d88148635d2de3e37c8bfd5a3188d8 Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Wed, 20 Mar 2024 01:04:05 +0000 Subject: [PATCH 10/11] update image verification --- 22/slim/debian/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/22/slim/debian/Dockerfile b/22/slim/debian/Dockerfile index 633002a5..1b930902 100644 --- a/22/slim/debian/Dockerfile +++ b/22/slim/debian/Dockerfile @@ -20,7 +20,7 @@ RUN set -ux \ && add-apt-repository 'deb https://apt.corretto.aws stable main' \ && mkdir -p /usr/share/man/man1 \ && apt-get update \ - && apt-get install zlib1g-dev \ + && apt-get install -y zlib1g-dev \ && apt-get install -y java-22-amazon-corretto-jdk=1:$version binutils \ && jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ From 6a781c054efb41a74ca339a1cf45b417621a9d2a Mon Sep 17 00:00:00 2001 From: Elif Aslan Date: Thu, 21 Mar 2024 22:34:55 +0000 Subject: [PATCH 11/11] Update for latest release --- 22/headful/al2023/Dockerfile | 2 +- 22/headless/al2023/Dockerfile | 2 +- 22/jdk/al2023/Dockerfile | 2 +- 22/jdk/alpine/3.16/Dockerfile | 2 +- 22/jdk/alpine/3.17/Dockerfile | 2 +- 22/jdk/alpine/3.18/Dockerfile | 2 +- 22/jdk/alpine/3.19/Dockerfile | 2 +- 22/jdk/debian/Dockerfile | 2 +- 22/slim/alpine/Dockerfile | 2 +- 22/slim/debian/Dockerfile | 3 +-- versions.json | 2 +- 11 files changed, 11 insertions(+), 12 deletions(-) diff --git a/22/headful/al2023/Dockerfile b/22/headful/al2023/Dockerfile index 1610e18c..69eeb172 100644 --- a/22/headful/al2023/Dockerfile +++ b/22/headful/al2023/Dockerfile @@ -1,6 +1,6 @@ FROM amazonlinux:2023 -ARG version=22.0.0.36-2 +ARG version=22.0.0.37-1 ARG package_version=1 RUN set -eux \ diff --git a/22/headless/al2023/Dockerfile b/22/headless/al2023/Dockerfile index 0ce03c96..c486992e 100644 --- a/22/headless/al2023/Dockerfile +++ b/22/headless/al2023/Dockerfile @@ -1,6 +1,6 @@ FROM amazonlinux:2023 -ARG version=22.0.0.36-2 +ARG version=22.0.0.37-1 ARG package_version=1 RUN set -eux \ diff --git a/22/jdk/al2023/Dockerfile b/22/jdk/al2023/Dockerfile index 25db8c66..9d8687e7 100644 --- a/22/jdk/al2023/Dockerfile +++ b/22/jdk/al2023/Dockerfile @@ -1,6 +1,6 @@ FROM amazonlinux:2023 -ARG version=22.0.0.36-2 +ARG version=22.0.0.37-1 ARG package_version=1 RUN set -eux \ diff --git a/22/jdk/alpine/3.16/Dockerfile b/22/jdk/alpine/3.16/Dockerfile index f8f13844..75fd684b 100644 --- a/22/jdk/alpine/3.16/Dockerfile +++ b/22/jdk/alpine/3.16/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.16 -ARG version=22.0.0.36.2 +ARG version=22.0.0.37.1 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/jdk/alpine/3.17/Dockerfile b/22/jdk/alpine/3.17/Dockerfile index 701a53a0..27ac27a8 100644 --- a/22/jdk/alpine/3.17/Dockerfile +++ b/22/jdk/alpine/3.17/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.17 -ARG version=22.0.0.36.2 +ARG version=22.0.0.37.1 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/jdk/alpine/3.18/Dockerfile b/22/jdk/alpine/3.18/Dockerfile index 181d3c88..f06908d9 100644 --- a/22/jdk/alpine/3.18/Dockerfile +++ b/22/jdk/alpine/3.18/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.18 -ARG version=22.0.0.36.2 +ARG version=22.0.0.37.1 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/jdk/alpine/3.19/Dockerfile b/22/jdk/alpine/3.19/Dockerfile index 5c77116e..cecc7227 100644 --- a/22/jdk/alpine/3.19/Dockerfile +++ b/22/jdk/alpine/3.19/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.19 -ARG version=22.0.0.36.2 +ARG version=22.0.0.37.1 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/jdk/debian/Dockerfile b/22/jdk/debian/Dockerfile index ca67c9e2..68a64fad 100644 --- a/22/jdk/debian/Dockerfile +++ b/22/jdk/debian/Dockerfile @@ -1,6 +1,6 @@ FROM debian:buster-slim -ARG version=22.0.0.36-2 +ARG version=22.0.0.37-1 # In addition to installing the Amazon corretto, we also install # fontconfig. The folks who manage the docker hub's # official image library have found that font management diff --git a/22/slim/alpine/Dockerfile b/22/slim/alpine/Dockerfile index 06bfeb18..968d2ad2 100644 --- a/22/slim/alpine/Dockerfile +++ b/22/slim/alpine/Dockerfile @@ -1,6 +1,6 @@ FROM alpine:3.17 -ARG version=22.0.0.36.2 +ARG version=22.0.0.37.1 # Please note that the THIRD-PARTY-LICENSE could be out of date if the base image has been updated recently. # The Corretto team will update this file but you may see a few days' delay. diff --git a/22/slim/debian/Dockerfile b/22/slim/debian/Dockerfile index 1b930902..21ab09bb 100644 --- a/22/slim/debian/Dockerfile +++ b/22/slim/debian/Dockerfile @@ -1,6 +1,6 @@ FROM debian:buster-slim -ARG version=22.0.0.36-2 +ARG version=22.0.0.37-1 # In addition to installing the Amazon corretto, we also install # fontconfig. The folks who manage the docker hub's # official image library have found that font management @@ -20,7 +20,6 @@ RUN set -ux \ && add-apt-repository 'deb https://apt.corretto.aws stable main' \ && mkdir -p /usr/share/man/man1 \ && apt-get update \ - && apt-get install -y zlib1g-dev \ && apt-get install -y java-22-amazon-corretto-jdk=1:$version binutils \ && jlink --add-modules "$(java --list-modules | sed -e 's/@[0-9].*$/,/' | tr -d \\n)" --no-man-pages --no-header-files --strip-debug --output /opt/corretto-slim \ && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \ diff --git a/versions.json b/versions.json index 6f675b2a..2708e4e0 100644 --- a/versions.json +++ b/versions.json @@ -3,6 +3,6 @@ "11" : "11.0.22.7.1", "17" : "17.0.10.7.1", "21" : "21.0.2.14.1", - "22" : "22.0.0.36.2" + "22" : "22.0.0.37.1" }