-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding Corretto-21 images, update github actions (#179)
- Loading branch information
Showing
19 changed files
with
426 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM amazonlinux:2023 | ||
|
||
ARG version=21.0.0.35-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-21-amazon-corretto-headless-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-21-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-21-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-21-amazon-corretto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM amazonlinux:2023 | ||
|
||
ARG version=21.0.0.35-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-21-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-21-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-21-amazon-corretto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM amazonlinux:2 | ||
|
||
ARG version=21.0.0.35-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 | ||
|
||
# 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-21-amazon-corretto-devel-$version \ | ||
&& (find /usr/lib/jvm/java-21-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-21-amazon-corretto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM amazonlinux:2023 | ||
|
||
ARG version=21.0.0.35-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-21-amazon-corretto-headless-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-21-amazon-corretto-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-21-amazon-corretto-devel-$version.amzn2023.${package_version}.$(uname -m).rpm" "java-21-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-21-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-21-amazon-corretto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM alpine:3.15 | ||
|
||
ARG version=21.0.0.35.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-21=$version-r0 && \ | ||
rm -rf /usr/lib/jvm/java-21-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM alpine:3.16 | ||
|
||
ARG version=21.0.0.35.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-21=$version-r0 && \ | ||
rm -rf /usr/lib/jvm/java-21-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM alpine:3.17 | ||
|
||
ARG version=21.0.0.35.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-21=$version-r0 && \ | ||
rm -rf /usr/lib/jvm/java-21-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
FROM alpine:3.18 | ||
|
||
ARG version=21.0.0.35.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-21=$version-r0 && \ | ||
rm -rf /usr/lib/jvm/java-21-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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM debian:buster-slim | ||
|
||
ARG version=21.0.0.35-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-21-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-21-amazon-corretto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
FROM amazonlinux:2 | ||
|
||
ARG version=21.0.0.35-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 | ||
|
||
# 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-21-amazon-corretto-devel-$version \ | ||
&& (find /usr/lib/jvm/java-21-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-21-amazon-corretto-devel-$version \ | ||
&& mkdir -p /usr/lib/jvm/ \ | ||
&& mv /opt/corretto-slim /usr/lib/jvm/java-21-amazon-corretto \ | ||
&& alternatives --install /usr/bin/java java /usr/lib/jvm/java-21-amazon-corretto/bin/java $(echo "1${version}" | sed "s/\(\.\|-\)//g") \ | ||
--slave /usr/bin/keytool keytool /usr/lib/jvm/java-21-amazon-corretto/bin/keytool \ | ||
--slave /usr/bin/rmid rmid /usr/lib/jvm/java-21-amazon-corretto/bin/rmid \ | ||
--slave /usr/bin/rmiregistry rmiregistry /usr/lib/jvm/java-21-amazon-corretto/bin/rmiregistry \ | ||
&& alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-21-amazon-corretto/bin/javac $(echo "1${version}" | sed "s/\(\.\|-\)//g") \ | ||
--slave /usr/bin/jaotc jaotc /usr/lib/jvm/java-21-amazon-corretto/bin/jaotc \ | ||
--slave /usr/bin/jlink jlink /usr/lib/jvm/java-21-amazon-corretto/bin/jlink \ | ||
--slave /usr/bin/jmod jmod /usr/lib/jvm/java-21-amazon-corretto/bin/jmod \ | ||
--slave /usr/bin/jhsdb jhsdb /usr/lib/jvm/java-21-amazon-corretto/bin/jhsdb \ | ||
--slave /usr/bin/jar jar /usr/lib/jvm/java-21-amazon-corretto/bin/jar \ | ||
--slave /usr/bin/jarsigner jarsigner /usr/lib/jvm/java-21-amazon-corretto/bin/jarsigner \ | ||
--slave /usr/bin/javadoc javadoc /usr/lib/jvm/java-21-amazon-corretto/bin/javadoc \ | ||
--slave /usr/bin/javap javap /usr/lib/jvm/java-21-amazon-corretto/bin/javap \ | ||
--slave /usr/bin/jcmd jcmd /usr/lib/jvm/java-21-amazon-corretto/bin/jcmd \ | ||
--slave /usr/bin/jconsole jconsole /usr/lib/jvm/java-21-amazon-corretto/bin/jconsole \ | ||
--slave /usr/bin/jdb jdb /usr/lib/jvm/java-21-amazon-corretto/bin/jdb \ | ||
--slave /usr/bin/jdeps jdeps /usr/lib/jvm/java-21-amazon-corretto/bin/jdeps \ | ||
--slave /usr/bin/jdeprscan jdeprscan /usr/lib/jvm/java-21-amazon-corretto/bin/jdeprscan \ | ||
--slave /usr/bin/jimage jimage /usr/lib/jvm/java-21-amazon-corretto/bin/jimage \ | ||
--slave /usr/bin/jinfo jinfo /usr/lib/jvm/java-21-amazon-corretto/bin/jinfo \ | ||
--slave /usr/bin/jmap jmap /usr/lib/jvm/java-21-amazon-corretto/bin/jmap \ | ||
--slave /usr/bin/jps jps /usr/lib/jvm/java-21-amazon-corretto/bin/jps \ | ||
--slave /usr/bin/jrunscript jrunscript /usr/lib/jvm/java-21-amazon-corretto/bin/jrunscript \ | ||
--slave /usr/bin/jshell jshell /usr/lib/jvm/java-21-amazon-corretto/bin/jshell \ | ||
--slave /usr/bin/jstack jstack /usr/lib/jvm/java-21-amazon-corretto/bin/jstack \ | ||
--slave /usr/bin/jstat jstat /usr/lib/jvm/java-21-amazon-corretto/bin/jstat \ | ||
--slave /usr/bin/jstatd jstatd /usr/lib/jvm/java-21-amazon-corretto/bin/jstatd \ | ||
&& yum clean all | ||
|
||
ENV LANG C.UTF-8 | ||
ENV JAVA_HOME=/usr/lib/jvm/java-21-amazon-corretto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
FROM alpine:3.17 | ||
|
||
ARG version=21.0.0.35.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-21=$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-21 && \ | ||
mkdir -p /usr/lib/jvm/ && \ | ||
mv /opt/corretto-slim /usr/lib/jvm/java-21-amazon-corretto && \ | ||
ln -sfn /usr/lib/jvm/java-21-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 |
Oops, something went wrong.
78ab1e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contents for library/amazoncorretto:
updated tags for [library/amazoncorretto](https://github.com/docker-library/official-images/blob/master/library/amazoncorretto)