From c8661b17819862db29f87fb139919aaf3a7c480c Mon Sep 17 00:00:00 2001 From: eclipse-temurin-bot Date: Mon, 2 Oct 2023 23:20:50 +0000 Subject: [PATCH 1/2] dockerfile: automated nightly updates --- 17/jdk/ubi/ubi9-minimal/Dockerfile.releases.full | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/17/jdk/ubi/ubi9-minimal/Dockerfile.releases.full b/17/jdk/ubi/ubi9-minimal/Dockerfile.releases.full index 4fe077619..0dd351656 100644 --- a/17/jdk/ubi/ubi9-minimal/Dockerfile.releases.full +++ b/17/jdk/ubi/ubi9-minimal/Dockerfile.releases.full @@ -43,7 +43,7 @@ RUN set -eux; \ ;; \ s390x|s390:64-bit) \ ESUM='ffacba69c6843d7ca70d572489d6cc7ab7ae52c60f0852cedf4cf0d248b6fc37'; \ - BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.8.1%2B1/OpenJDK17U-jdk_s390x_linux_hotspot_17.0.8.1_1.tar.gz'; \ + BINARY_URL=''; \ ;; \ amd64|i386:x86-64) \ ESUM='c25dfbc334068a48c19c44ce39ad4b8427e309ae1cfa83f23c102e78b8a6dcc0'; \ From 08da286a0818457b89692655dfc68ff3e92049c6 Mon Sep 17 00:00:00 2001 From: eclipse-temurin-bot Date: Tue, 10 Oct 2023 14:14:16 +0000 Subject: [PATCH 2/2] dockerfile: automated nightly updates --- 21/jdk/alpine/Dockerfile.releases.full | 71 +++++++++++++++++ 21/jdk/alpine/entrypoint.sh | 30 ++++++++ .../ubi/ubi9-minimal/Dockerfile.releases.full | 68 ++++++++++++++++ 21/jdk/ubi/ubi9-minimal/entrypoint.sh | 30 ++++++++ 21/jdk/ubuntu/jammy/Dockerfile.releases.full | 77 +++++++++++++++++++ 21/jdk/ubuntu/jammy/entrypoint.sh | 30 ++++++++ .../nanoserver-1809/Dockerfile.releases.full | 41 ++++++++++ .../Dockerfile.releases.full | 41 ++++++++++ .../Dockerfile.releases.full | 56 ++++++++++++++ .../Dockerfile.releases.full | 56 ++++++++++++++ 21/jre/alpine/Dockerfile.releases.full | 68 ++++++++++++++++ 21/jre/alpine/entrypoint.sh | 30 ++++++++ .../ubi/ubi9-minimal/Dockerfile.releases.full | 65 ++++++++++++++++ 21/jre/ubi/ubi9-minimal/entrypoint.sh | 30 ++++++++ 21/jre/ubuntu/jammy/Dockerfile.releases.full | 74 ++++++++++++++++++ 21/jre/ubuntu/jammy/entrypoint.sh | 30 ++++++++ .../nanoserver-1809/Dockerfile.releases.full | 38 +++++++++ .../Dockerfile.releases.full | 38 +++++++++ .../Dockerfile.releases.full | 53 +++++++++++++ .../Dockerfile.releases.full | 53 +++++++++++++ 20 files changed, 979 insertions(+) create mode 100644 21/jdk/alpine/Dockerfile.releases.full create mode 100755 21/jdk/alpine/entrypoint.sh create mode 100644 21/jdk/ubi/ubi9-minimal/Dockerfile.releases.full create mode 100755 21/jdk/ubi/ubi9-minimal/entrypoint.sh create mode 100644 21/jdk/ubuntu/jammy/Dockerfile.releases.full create mode 100755 21/jdk/ubuntu/jammy/entrypoint.sh create mode 100644 21/jdk/windows/nanoserver-1809/Dockerfile.releases.full create mode 100644 21/jdk/windows/nanoserver-ltsc2022/Dockerfile.releases.full create mode 100644 21/jdk/windows/windowsservercore-1809/Dockerfile.releases.full create mode 100644 21/jdk/windows/windowsservercore-ltsc2022/Dockerfile.releases.full create mode 100644 21/jre/alpine/Dockerfile.releases.full create mode 100755 21/jre/alpine/entrypoint.sh create mode 100644 21/jre/ubi/ubi9-minimal/Dockerfile.releases.full create mode 100755 21/jre/ubi/ubi9-minimal/entrypoint.sh create mode 100644 21/jre/ubuntu/jammy/Dockerfile.releases.full create mode 100755 21/jre/ubuntu/jammy/entrypoint.sh create mode 100644 21/jre/windows/nanoserver-1809/Dockerfile.releases.full create mode 100644 21/jre/windows/nanoserver-ltsc2022/Dockerfile.releases.full create mode 100644 21/jre/windows/windowsservercore-1809/Dockerfile.releases.full create mode 100644 21/jre/windows/windowsservercore-ltsc2022/Dockerfile.releases.full diff --git a/21/jdk/alpine/Dockerfile.releases.full b/21/jdk/alpine/Dockerfile.releases.full new file mode 100644 index 000000000..3309e7d63 --- /dev/null +++ b/21/jdk/alpine/Dockerfile.releases.full @@ -0,0 +1,71 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM alpine:3.18 + +ENV JAVA_HOME /opt/java/openjdk +ENV PATH $JAVA_HOME/bin:$PATH + +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +# fontconfig and ttf-dejavu added to support serverside image generation by Java programs +# java-cacerts added to support adding CA certificates to the Java keystore +# bash is required for the entrypoint script (s. https://github.com/adoptium/containers/issues/415) +RUN apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib \ + && rm -rf /var/cache/apk/* + +ENV JAVA_VERSION jdk-21+35 + +RUN set -eux; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM=''; \ + BINARY_URL=''; \ + ;; \ + amd64|x86_64) \ + ESUM='4fd74f93f0b1a94d8471e0ed801fe9d938f7471f6efe8791880c85e7716c943f'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jdk_x64_alpine-linux_hotspot_21_35.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; + +RUN echo Verifying install ... \ + && fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. +COPY entrypoint.sh /__cacert_entrypoint.sh +ENTRYPOINT ["/__cacert_entrypoint.sh"] + +CMD ["jshell"] diff --git a/21/jdk/alpine/entrypoint.sh b/21/jdk/alpine/entrypoint.sh new file mode 100755 index 000000000..dfcf546f9 --- /dev/null +++ b/21/jdk/alpine/entrypoint.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Sheband needs to be `bash`, see https://github.com/adoptium/containers/issues/415 for details + +set -e + +# Opt-in is only activated if the environment variable is set +if [ -n "$USE_SYSTEM_CA_CERTS" ]; then + + # Copy certificates from /certificates to the system truststore, but only if the directory exists and is not empty. + # The reason why this is not part of the opt-in is because it leaves open the option to mount certificates at the + # system location, for whatever reason. + if [ -d /certificates ] && [ "$(ls -A /certificates)" ]; then + cp -a /certificates/* /usr/local/share/ca-certificates/ + fi + + CACERT=$JAVA_HOME/lib/security/cacerts + + # JDK8 puts its JRE in a subdirectory + if [ -f "$JAVA_HOME/jre/lib/security/cacerts" ]; then + CACERT=$JAVA_HOME/jre/lib/security/cacerts + fi + + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. + update-ca-certificates + + trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" +fi + +exec "$@" diff --git a/21/jdk/ubi/ubi9-minimal/Dockerfile.releases.full b/21/jdk/ubi/ubi9-minimal/Dockerfile.releases.full new file mode 100644 index 000000000..cf1eab90d --- /dev/null +++ b/21/jdk/ubi/ubi9-minimal/Dockerfile.releases.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM redhat/ubi9-minimal + +ENV JAVA_HOME /opt/java/openjdk +ENV PATH $JAVA_HOME/bin:$PATH + +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf clean all + +ENV JAVA_VERSION jdk-21+35 + +RUN set -eux; \ + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='33e440c237438aa2e3866d84ead8d4e00dc0992d98d9fd0ee2fe48192f2dbc4b'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jdk_aarch64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + amd64|i386:x86-64) \ + ESUM='82f64c53acaa045370d6762ebd7441b74e6fda14b464d54d1ff8ca941ec069e6'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jdk_x64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; + +RUN echo Verifying install ... \ + && fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. +COPY entrypoint.sh /__cacert_entrypoint.sh +ENTRYPOINT ["/__cacert_entrypoint.sh"] + +CMD ["jshell"] diff --git a/21/jdk/ubi/ubi9-minimal/entrypoint.sh b/21/jdk/ubi/ubi9-minimal/entrypoint.sh new file mode 100755 index 000000000..4d352111b --- /dev/null +++ b/21/jdk/ubi/ubi9-minimal/entrypoint.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Sheband needs to be `bash`, see https://github.com/adoptium/containers/issues/415 for details + +set -e + +# Opt-in is only activated if the environment variable is set +if [ -n "$USE_SYSTEM_CA_CERTS" ]; then + + # Copy certificates from /certificates to the system truststore, but only if the directory exists and is not empty. + # The reason why this is not part of the opt-in is because it leaves open the option to mount certificates at the + # system location, for whatever reason. + if [ -d /certificates ] && [ "$(ls -A /certificates)" ]; then + cp -a /certificates/* /usr/share/pki/ca-trust-source/anchors/ + fi + + CACERT=$JAVA_HOME/lib/security/cacerts + + # JDK8 puts its JRE in a subdirectory + if [ -f "$JAVA_HOME/jre/lib/security/cacerts" ]; then + CACERT=$JAVA_HOME/jre/lib/security/cacerts + fi + + # RHEL-based images already include a routine to update a java truststore from the system CA bundle within + # `update-ca-trust`. All we need to do is to link the system CA bundle to the java truststore. + update-ca-trust + + ln -sf /etc/pki/ca-trust/extracted/java/cacerts "$CACERT" +fi + +exec "$@" diff --git a/21/jdk/ubuntu/jammy/Dockerfile.releases.full b/21/jdk/ubuntu/jammy/Dockerfile.releases.full new file mode 100644 index 000000000..531106436 --- /dev/null +++ b/21/jdk/ubuntu/jammy/Dockerfile.releases.full @@ -0,0 +1,77 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM ubuntu:22.04 + +ENV JAVA_HOME /opt/java/openjdk +ENV PATH $JAVA_HOME/bin:$PATH + +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl wget ca-certificates fontconfig locales p11-kit binutils \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV JAVA_VERSION jdk-21+35 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='33e440c237438aa2e3866d84ead8d4e00dc0992d98d9fd0ee2fe48192f2dbc4b'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jdk_aarch64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + amd64|i386:x86-64) \ + ESUM='82f64c53acaa045370d6762ebd7441b74e6fda14b464d54d1ff8ca941ec069e6'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jdk_x64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; \ +# https://github.com/docker-library/openjdk/issues/331#issuecomment-498834472 + find "$JAVA_HOME/lib" -name '*.so' -exec dirname '{}' ';' | sort -u > /etc/ld.so.conf.d/docker-openjdk.conf; \ + ldconfig; \ +# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840 +# https://openjdk.java.net/jeps/341 + java -Xshare:dump; + +RUN echo Verifying install ... \ + && fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. +COPY entrypoint.sh /__cacert_entrypoint.sh +ENTRYPOINT ["/__cacert_entrypoint.sh"] + +CMD ["jshell"] diff --git a/21/jdk/ubuntu/jammy/entrypoint.sh b/21/jdk/ubuntu/jammy/entrypoint.sh new file mode 100755 index 000000000..dfcf546f9 --- /dev/null +++ b/21/jdk/ubuntu/jammy/entrypoint.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Sheband needs to be `bash`, see https://github.com/adoptium/containers/issues/415 for details + +set -e + +# Opt-in is only activated if the environment variable is set +if [ -n "$USE_SYSTEM_CA_CERTS" ]; then + + # Copy certificates from /certificates to the system truststore, but only if the directory exists and is not empty. + # The reason why this is not part of the opt-in is because it leaves open the option to mount certificates at the + # system location, for whatever reason. + if [ -d /certificates ] && [ "$(ls -A /certificates)" ]; then + cp -a /certificates/* /usr/local/share/ca-certificates/ + fi + + CACERT=$JAVA_HOME/lib/security/cacerts + + # JDK8 puts its JRE in a subdirectory + if [ -f "$JAVA_HOME/jre/lib/security/cacerts" ]; then + CACERT=$JAVA_HOME/jre/lib/security/cacerts + fi + + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. + update-ca-certificates + + trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" +fi + +exec "$@" diff --git a/21/jdk/windows/nanoserver-1809/Dockerfile.releases.full b/21/jdk/windows/nanoserver-1809/Dockerfile.releases.full new file mode 100644 index 000000000..e06f67b2b --- /dev/null +++ b/21/jdk/windows/nanoserver-1809/Dockerfile.releases.full @@ -0,0 +1,41 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/nanoserver:1809 + +SHELL ["cmd", "/s", "/c"] + +ENV JAVA_VERSION + +ENV JAVA_HOME C:\\openjdk-21 +# "ERROR: Access to the registry path is denied." +USER ContainerAdministrator +RUN echo Updating PATH: %JAVA_HOME%\bin;%PATH% \ + && setx /M PATH %JAVA_HOME%\bin;%PATH% \ + && echo Complete. +USER ContainerUser + +COPY --from=eclipse-temurin:-jdk-windowsservercore-1809 $JAVA_HOME $JAVA_HOME + +RUN echo Verifying install ... \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. + +CMD ["jshell"] diff --git a/21/jdk/windows/nanoserver-ltsc2022/Dockerfile.releases.full b/21/jdk/windows/nanoserver-ltsc2022/Dockerfile.releases.full new file mode 100644 index 000000000..006aaf1b7 --- /dev/null +++ b/21/jdk/windows/nanoserver-ltsc2022/Dockerfile.releases.full @@ -0,0 +1,41 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 + +SHELL ["cmd", "/s", "/c"] + +ENV JAVA_VERSION + +ENV JAVA_HOME C:\\openjdk-21 +# "ERROR: Access to the registry path is denied." +USER ContainerAdministrator +RUN echo Updating PATH: %JAVA_HOME%\bin;%PATH% \ + && setx /M PATH %JAVA_HOME%\bin;%PATH% \ + && echo Complete. +USER ContainerUser + +COPY --from=eclipse-temurin:-jdk-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME + +RUN echo Verifying install ... \ + && echo javac --version && javac --version \ + && echo java --version && java --version \ + && echo Complete. + +CMD ["jshell"] diff --git a/21/jdk/windows/windowsservercore-1809/Dockerfile.releases.full b/21/jdk/windows/windowsservercore-1809/Dockerfile.releases.full new file mode 100644 index 000000000..8e1cbbbef --- /dev/null +++ b/21/jdk/windows/windowsservercore-1809/Dockerfile.releases.full @@ -0,0 +1,56 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/servercore:1809 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION + +RUN Write-Host ('Downloading ...'); \ + curl.exe -LfsSo openjdk.msi ; \ + Write-Host ('Verifying sha256 () ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + $proc = Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome', 'INSTALLDIR=C:\openjdk-21' -Wait -Passthru; \ + $proc.WaitForExit() ; \ + if ($proc.ExitCode -ne 0) { \ + Write-Host 'FAILED installing MSI!' ; \ + exit 1; \ + }; \ + \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force + +RUN Write-Host 'Verifying install ...'; \ + Write-Host 'javac --version'; javac --version; \ + Write-Host 'java --version'; java --version; \ + \ + Write-Host 'Complete.' + +CMD ["jshell"] diff --git a/21/jdk/windows/windowsservercore-ltsc2022/Dockerfile.releases.full b/21/jdk/windows/windowsservercore-ltsc2022/Dockerfile.releases.full new file mode 100644 index 000000000..8cc4bcbef --- /dev/null +++ b/21/jdk/windows/windowsservercore-ltsc2022/Dockerfile.releases.full @@ -0,0 +1,56 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2022 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION + +RUN Write-Host ('Downloading ...'); \ + curl.exe -LfsSo openjdk.msi ; \ + Write-Host ('Verifying sha256 () ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + $proc = Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome', 'INSTALLDIR=C:\openjdk-21' -Wait -Passthru; \ + $proc.WaitForExit() ; \ + if ($proc.ExitCode -ne 0) { \ + Write-Host 'FAILED installing MSI!' ; \ + exit 1; \ + }; \ + \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force + +RUN Write-Host 'Verifying install ...'; \ + Write-Host 'javac --version'; javac --version; \ + Write-Host 'java --version'; java --version; \ + \ + Write-Host 'Complete.' + +CMD ["jshell"] diff --git a/21/jre/alpine/Dockerfile.releases.full b/21/jre/alpine/Dockerfile.releases.full new file mode 100644 index 000000000..2bd9909ab --- /dev/null +++ b/21/jre/alpine/Dockerfile.releases.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM alpine:3.18 + +ENV JAVA_HOME /opt/java/openjdk +ENV PATH $JAVA_HOME/bin:$PATH + +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +# fontconfig and ttf-dejavu added to support serverside image generation by Java programs +# java-cacerts added to support adding CA certificates to the Java keystore +# bash is required for the entrypoint script (s. https://github.com/adoptium/containers/issues/415) +RUN apk add --no-cache fontconfig java-cacerts bash libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib \ + && rm -rf /var/cache/apk/* + +ENV JAVA_VERSION jdk-21+35 + +RUN set -eux; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM=''; \ + BINARY_URL=''; \ + ;; \ + amd64|x86_64) \ + ESUM='9e7aa5ca9d8819e8fb3ae9f3c146905bee81808b70b875de0984ec55b1bd8559'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jre_x64_alpine-linux_hotspot_21_35.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; + +RUN echo Verifying install ... \ + && fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \ + && echo java --version && java --version \ + && echo Complete. +COPY entrypoint.sh /__cacert_entrypoint.sh +ENTRYPOINT ["/__cacert_entrypoint.sh"] diff --git a/21/jre/alpine/entrypoint.sh b/21/jre/alpine/entrypoint.sh new file mode 100755 index 000000000..dfcf546f9 --- /dev/null +++ b/21/jre/alpine/entrypoint.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Sheband needs to be `bash`, see https://github.com/adoptium/containers/issues/415 for details + +set -e + +# Opt-in is only activated if the environment variable is set +if [ -n "$USE_SYSTEM_CA_CERTS" ]; then + + # Copy certificates from /certificates to the system truststore, but only if the directory exists and is not empty. + # The reason why this is not part of the opt-in is because it leaves open the option to mount certificates at the + # system location, for whatever reason. + if [ -d /certificates ] && [ "$(ls -A /certificates)" ]; then + cp -a /certificates/* /usr/local/share/ca-certificates/ + fi + + CACERT=$JAVA_HOME/lib/security/cacerts + + # JDK8 puts its JRE in a subdirectory + if [ -f "$JAVA_HOME/jre/lib/security/cacerts" ]; then + CACERT=$JAVA_HOME/jre/lib/security/cacerts + fi + + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. + update-ca-certificates + + trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" +fi + +exec "$@" diff --git a/21/jre/ubi/ubi9-minimal/Dockerfile.releases.full b/21/jre/ubi/ubi9-minimal/Dockerfile.releases.full new file mode 100644 index 000000000..c8952ae9b --- /dev/null +++ b/21/jre/ubi/ubi9-minimal/Dockerfile.releases.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM redhat/ubi9-minimal + +ENV JAVA_HOME /opt/java/openjdk +ENV PATH $JAVA_HOME/bin:$PATH + +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y binutils tzdata openssl wget ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf clean all + +ENV JAVA_VERSION jdk-21+35 + +RUN set -eux; \ + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5a36cde2956749aaad502e1df6729072e5483265fce142230516261da9a391db'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jre_aarch64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + amd64|i386:x86-64) \ + ESUM='080a53a3f75b94450779199f09c8d91b53637d315f128c58a4f160fb6272502d'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jre_x64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; + +RUN echo Verifying install ... \ + && fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \ + && echo java --version && java --version \ + && echo Complete. +COPY entrypoint.sh /__cacert_entrypoint.sh +ENTRYPOINT ["/__cacert_entrypoint.sh"] diff --git a/21/jre/ubi/ubi9-minimal/entrypoint.sh b/21/jre/ubi/ubi9-minimal/entrypoint.sh new file mode 100755 index 000000000..4d352111b --- /dev/null +++ b/21/jre/ubi/ubi9-minimal/entrypoint.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Sheband needs to be `bash`, see https://github.com/adoptium/containers/issues/415 for details + +set -e + +# Opt-in is only activated if the environment variable is set +if [ -n "$USE_SYSTEM_CA_CERTS" ]; then + + # Copy certificates from /certificates to the system truststore, but only if the directory exists and is not empty. + # The reason why this is not part of the opt-in is because it leaves open the option to mount certificates at the + # system location, for whatever reason. + if [ -d /certificates ] && [ "$(ls -A /certificates)" ]; then + cp -a /certificates/* /usr/share/pki/ca-trust-source/anchors/ + fi + + CACERT=$JAVA_HOME/lib/security/cacerts + + # JDK8 puts its JRE in a subdirectory + if [ -f "$JAVA_HOME/jre/lib/security/cacerts" ]; then + CACERT=$JAVA_HOME/jre/lib/security/cacerts + fi + + # RHEL-based images already include a routine to update a java truststore from the system CA bundle within + # `update-ca-trust`. All we need to do is to link the system CA bundle to the java truststore. + update-ca-trust + + ln -sf /etc/pki/ca-trust/extracted/java/cacerts "$CACERT" +fi + +exec "$@" diff --git a/21/jre/ubuntu/jammy/Dockerfile.releases.full b/21/jre/ubuntu/jammy/Dockerfile.releases.full new file mode 100644 index 000000000..48af6601b --- /dev/null +++ b/21/jre/ubuntu/jammy/Dockerfile.releases.full @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM ubuntu:22.04 + +ENV JAVA_HOME /opt/java/openjdk +ENV PATH $JAVA_HOME/bin:$PATH + +# Default to UTF-8 file.encoding +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl wget ca-certificates fontconfig locales p11-kit binutils \ + && echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ + && locale-gen en_US.UTF-8 \ + && rm -rf /var/lib/apt/lists/* + +ENV JAVA_VERSION jdk-21+35 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5a36cde2956749aaad502e1df6729072e5483265fce142230516261da9a391db'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jre_aarch64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + amd64|i386:x86-64) \ + ESUM='080a53a3f75b94450779199f09c8d91b53637d315f128c58a4f160fb6272502d'; \ + BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21%2B35/OpenJDK21U-jre_x64_linux_hotspot_21_35.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p "$JAVA_HOME"; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory "$JAVA_HOME" \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/lib/src.zip; \ +# https://github.com/docker-library/openjdk/issues/331#issuecomment-498834472 + find "$JAVA_HOME/lib" -name '*.so' -exec dirname '{}' ';' | sort -u > /etc/ld.so.conf.d/docker-openjdk.conf; \ + ldconfig; \ +# https://github.com/docker-library/openjdk/issues/212#issuecomment-420979840 +# https://openjdk.java.net/jeps/341 + java -Xshare:dump; + +RUN echo Verifying install ... \ + && fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \ + && echo java --version && java --version \ + && echo Complete. +COPY entrypoint.sh /__cacert_entrypoint.sh +ENTRYPOINT ["/__cacert_entrypoint.sh"] diff --git a/21/jre/ubuntu/jammy/entrypoint.sh b/21/jre/ubuntu/jammy/entrypoint.sh new file mode 100755 index 000000000..dfcf546f9 --- /dev/null +++ b/21/jre/ubuntu/jammy/entrypoint.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# Sheband needs to be `bash`, see https://github.com/adoptium/containers/issues/415 for details + +set -e + +# Opt-in is only activated if the environment variable is set +if [ -n "$USE_SYSTEM_CA_CERTS" ]; then + + # Copy certificates from /certificates to the system truststore, but only if the directory exists and is not empty. + # The reason why this is not part of the opt-in is because it leaves open the option to mount certificates at the + # system location, for whatever reason. + if [ -d /certificates ] && [ "$(ls -A /certificates)" ]; then + cp -a /certificates/* /usr/local/share/ca-certificates/ + fi + + CACERT=$JAVA_HOME/lib/security/cacerts + + # JDK8 puts its JRE in a subdirectory + if [ -f "$JAVA_HOME/jre/lib/security/cacerts" ]; then + CACERT=$JAVA_HOME/jre/lib/security/cacerts + fi + + # OpenJDK images used to create a hook for `update-ca-certificates`. Since we are using an entrypoint anyway, we + # might as well just generate the truststore and skip the hooks. + update-ca-certificates + + trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$CACERT" +fi + +exec "$@" diff --git a/21/jre/windows/nanoserver-1809/Dockerfile.releases.full b/21/jre/windows/nanoserver-1809/Dockerfile.releases.full new file mode 100644 index 000000000..64e450bfc --- /dev/null +++ b/21/jre/windows/nanoserver-1809/Dockerfile.releases.full @@ -0,0 +1,38 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/nanoserver:1809 + +SHELL ["cmd", "/s", "/c"] + +ENV JAVA_VERSION + +ENV JAVA_HOME C:\\openjdk-21 +# "ERROR: Access to the registry path is denied." +USER ContainerAdministrator +RUN echo Updating PATH: %JAVA_HOME%\bin;%PATH% \ + && setx /M PATH %JAVA_HOME%\bin;%PATH% \ + && echo Complete. +USER ContainerUser + +COPY --from=eclipse-temurin:-jre-windowsservercore-1809 $JAVA_HOME $JAVA_HOME + +RUN echo Verifying install ... \ + && echo java --version && java --version \ + && echo Complete. diff --git a/21/jre/windows/nanoserver-ltsc2022/Dockerfile.releases.full b/21/jre/windows/nanoserver-ltsc2022/Dockerfile.releases.full new file mode 100644 index 000000000..6e2d8561d --- /dev/null +++ b/21/jre/windows/nanoserver-ltsc2022/Dockerfile.releases.full @@ -0,0 +1,38 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/nanoserver:ltsc2022 + +SHELL ["cmd", "/s", "/c"] + +ENV JAVA_VERSION + +ENV JAVA_HOME C:\\openjdk-21 +# "ERROR: Access to the registry path is denied." +USER ContainerAdministrator +RUN echo Updating PATH: %JAVA_HOME%\bin;%PATH% \ + && setx /M PATH %JAVA_HOME%\bin;%PATH% \ + && echo Complete. +USER ContainerUser + +COPY --from=eclipse-temurin:-jre-windowsservercore-ltsc2022 $JAVA_HOME $JAVA_HOME + +RUN echo Verifying install ... \ + && echo java --version && java --version \ + && echo Complete. diff --git a/21/jre/windows/windowsservercore-1809/Dockerfile.releases.full b/21/jre/windows/windowsservercore-1809/Dockerfile.releases.full new file mode 100644 index 000000000..b8efeed8b --- /dev/null +++ b/21/jre/windows/windowsservercore-1809/Dockerfile.releases.full @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/servercore:1809 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION + +RUN Write-Host ('Downloading ...'); \ + curl.exe -LfsSo openjdk.msi ; \ + Write-Host ('Verifying sha256 () ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + $proc = Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome', 'INSTALLDIR=C:\openjdk-21' -Wait -Passthru; \ + $proc.WaitForExit() ; \ + if ($proc.ExitCode -ne 0) { \ + Write-Host 'FAILED installing MSI!' ; \ + exit 1; \ + }; \ + \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force + +RUN Write-Host 'Verifying install ...'; \ + Write-Host 'java --version'; java --version; \ + \ + Write-Host 'Complete.' diff --git a/21/jre/windows/windowsservercore-ltsc2022/Dockerfile.releases.full b/21/jre/windows/windowsservercore-ltsc2022/Dockerfile.releases.full new file mode 100644 index 000000000..0c8842d6a --- /dev/null +++ b/21/jre/windows/windowsservercore-ltsc2022/Dockerfile.releases.full @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "update_multiarch.sh" +# +# PLEASE DO NOT EDIT IT DIRECTLY. +# ------------------------------------------------------------------------------ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +FROM mcr.microsoft.com/windows/servercore:ltsc2022 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION + +RUN Write-Host ('Downloading ...'); \ + curl.exe -LfsSo openjdk.msi ; \ + Write-Host ('Verifying sha256 () ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + $proc = Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome', 'INSTALLDIR=C:\openjdk-21' -Wait -Passthru; \ + $proc.WaitForExit() ; \ + if ($proc.ExitCode -ne 0) { \ + Write-Host 'FAILED installing MSI!' ; \ + exit 1; \ + }; \ + \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force + +RUN Write-Host 'Verifying install ...'; \ + Write-Host 'java --version'; java --version; \ + \ + Write-Host 'Complete.'