From bd43b85897bed2bb658c08efb2be8a4c77ddf059 Mon Sep 17 00:00:00 2001 From: Elif Aslan <116521601+elifaslan1@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:44:16 -0700 Subject: [PATCH] Add 22 (#199) * Add 22 Images Co-authored-by: Sergey Bylokhov --- .github/workflows/verify-images.yml | 34 +++++++++++++++++++++++-- 22/headful/al2023/Dockerfile | 24 ++++++++++++++++++ 22/headless/al2023/Dockerfile | 24 ++++++++++++++++++ 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/alpine/Dockerfile | 29 ++++++++++++++++++++++ 22/slim/debian/Dockerfile | 37 ++++++++++++++++++++++++++++ bin/apply-template.py | 0 bin/tag-generator.py | 0 bin/update-dockerfiles.sh | 6 +++++ 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, 353 insertions(+), 3 deletions(-) create mode 100644 22/headful/al2023/Dockerfile create mode 100644 22/headless/al2023/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/alpine/Dockerfile create mode 100644 22/slim/debian/Dockerfile mode change 100644 => 100755 bin/apply-template.py 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/.github/workflows/verify-images.yml b/.github/workflows/verify-images.yml index b23e3ab4..6cbdf047 100644 --- a/.github/workflows/verify-images.yml +++ b/.github/workflows/verify-images.yml @@ -18,6 +18,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-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 runs-on: ubuntu-latest @@ -33,6 +48,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 @@ -54,7 +84,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 +99,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/headful/al2023/Dockerfile b/22/headful/al2023/Dockerfile new file mode 100644 index 00000000..69eeb172 --- /dev/null +++ b/22/headful/al2023/Dockerfile @@ -0,0 +1,24 @@ +FROM amazonlinux:2023 + +ARG version=22.0.0.37-1 +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..c486992e --- /dev/null +++ b/22/headless/al2023/Dockerfile @@ -0,0 +1,24 @@ +FROM amazonlinux:2023 + +ARG version=22.0.0.37-1 +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/al2023/Dockerfile b/22/jdk/al2023/Dockerfile new file mode 100644 index 00000000..9d8687e7 --- /dev/null +++ b/22/jdk/al2023/Dockerfile @@ -0,0 +1,24 @@ +FROM amazonlinux:2023 + +ARG version=22.0.0.37-1 +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..75fd684b --- /dev/null +++ b/22/jdk/alpine/3.16/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.16 + +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. +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..27ac27a8 --- /dev/null +++ b/22/jdk/alpine/3.17/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.17 + +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. +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..f06908d9 --- /dev/null +++ b/22/jdk/alpine/3.18/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.18 + +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. +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..cecc7227 --- /dev/null +++ b/22/jdk/alpine/3.19/Dockerfile @@ -0,0 +1,22 @@ +FROM alpine:3.19 + +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. +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..68a64fad --- /dev/null +++ b/22/jdk/debian/Dockerfile @@ -0,0 +1,26 @@ +FROM debian:buster-slim + +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 +# 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/alpine/Dockerfile b/22/slim/alpine/Dockerfile new file mode 100644 index 00000000..968d2ad2 --- /dev/null +++ b/22/slim/alpine/Dockerfile @@ -0,0 +1,29 @@ +FROM alpine:3.17 + +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. +# +# 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..21ab09bb --- /dev/null +++ b/22/slim/debian/Dockerfile @@ -0,0 +1,37 @@ +FROM debian:buster-slim + +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 +# 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/apply-template.py b/bin/apply-template.py old mode 100644 new mode 100755 diff --git a/bin/tag-generator.py b/bin/tag-generator.py old mode 100644 new mode 100755 diff --git a/bin/update-dockerfiles.sh b/bin/update-dockerfiles.sh index 916d9648..a7f61079 100755 --- a/bin/update-dockerfiles.sh +++ b/bin/update-dockerfiles.sh @@ -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..2708e4e0 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.37.1" }