diff --git a/16/jdk/alpine/Dockerfile.hotspot.nightly.full b/16/jdk/alpine/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..debafa9a3 --- /dev/null +++ b/16/jdk/alpine/Dockerfile.hotspot.nightly.full @@ -0,0 +1,99 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/alpine/Dockerfile.hotspot.nightly.slim b/16/jdk/alpine/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..67e697cf7 --- /dev/null +++ b/16/jdk/alpine/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apk add --no-cache --virtual .build-deps bash binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apk del --purge .build-deps; \ + rm -rf /var/cache/apk/*; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/alpine/Dockerfile.hotspot.releases.full b/16/jdk/alpine/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..9ca17edef --- /dev/null +++ b/16/jdk/alpine/Dockerfile.hotspot.releases.full @@ -0,0 +1,99 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/alpine/Dockerfile.hotspot.releases.slim b/16/jdk/alpine/Dockerfile.hotspot.releases.slim new file mode 100644 index 000000000..bb5e80121 --- /dev/null +++ b/16/jdk/alpine/Dockerfile.hotspot.releases.slim @@ -0,0 +1,106 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk-16+36 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apk add --no-cache --virtual .build-deps bash binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apk del --purge .build-deps; \ + rm -rf /var/cache/apk/*; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/alpine/Dockerfile.openj9.nightly.full b/16/jdk/alpine/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..8d7744ece --- /dev/null +++ b/16/jdk/alpine/Dockerfile.openj9.nightly.full @@ -0,0 +1,149 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + apk add --no-cache --virtual .scc-deps curl; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + apk del --purge .scc-deps; \ + rm -rf /var/cache/apk/*; \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/alpine/Dockerfile.openj9.nightly.slim b/16/jdk/alpine/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..7bdf90813 --- /dev/null +++ b/16/jdk/alpine/Dockerfile.openj9.nightly.slim @@ -0,0 +1,156 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apk add --no-cache --virtual .build-deps bash binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apk del --purge .build-deps; \ + rm -rf /var/cache/apk/*; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + apk add --no-cache --virtual .scc-deps curl; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + apk del --purge .scc-deps; \ + rm -rf /var/cache/apk/*; \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/alpine/Dockerfile.openj9.releases.full b/16/jdk/alpine/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..4c36be6ca --- /dev/null +++ b/16/jdk/alpine/Dockerfile.openj9.releases.full @@ -0,0 +1,149 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + apk add --no-cache --virtual .scc-deps curl; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + apk del --purge .scc-deps; \ + rm -rf /var/cache/apk/*; \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/alpine/Dockerfile.openj9.releases.slim b/16/jdk/alpine/Dockerfile.openj9.releases.slim new file mode 100644 index 000000000..6ac72cbdf --- /dev/null +++ b/16/jdk/alpine/Dockerfile.openj9.releases.slim @@ -0,0 +1,156 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apk add --no-cache --virtual .build-deps bash binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apk del --purge .build-deps; \ + rm -rf /var/cache/apk/*; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + apk add --no-cache --virtual .scc-deps curl; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + apk del --purge .scc-deps; \ + rm -rf /var/cache/apk/*; \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/alpine/slim-java.sh b/16/jdk/alpine/slim-java.sh new file mode 100755 index 000000000..2a6b612c4 --- /dev/null +++ b/16/jdk/alpine/slim-java.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash +# +# 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. +# +set -o pipefail + +# Parse arguments +argc=$# +if [ ${argc} != 1 ]; then + message=$(basename "$0") + echo " Usage: ${message} Full-JDK-path" + exit 1 +fi + +# Which major java version +function get_java_version() { + # Only version 8 has the 1.8.0 format, all others have x.y.z-nnn where x is the major version + jver_string="$(java -version 2>&1 | grep "^openjdk version" | awk '{ print $3 }')" + ver_string="$(echo "${jver_string}" | awk -F'.' '{ print $1 }' | awk -F'"' '{ print $2 }')" + case "${ver_string}" in + 1) + java_major_version="8"; + ;; + *) + java_major_version="${ver_string}"; + ;; + esac +} + +# Set the java major version that we are on right now. +get_java_version + +# Validate prerequisites(tools) necessary for making a slim build +if [ "${java_major_version}" -ge 14 ]; then + tools="jar jarsigner strip" +else + tools="jar jarsigner pack200 strip" +fi + +for tool in ${tools}; +do + command -v "${tool}" >/dev/null 2>&1 || { echo >&2 "${tool} not found, please add ${tool} into PATH"; exit 1; } +done + +# Set input of this script +src="$1" +# Store necessary directories paths +basedir=$(dirname "${src}") +scriptdir=$(dirname "$0") +target="${basedir}"/slim + +# Files for Keep and Del list of classes in rt.jar +keep_list="${scriptdir}/slim-java_rtjar_keep.list" +del_list="${scriptdir}/slim-java_rtjar_del.list" +# jmod files to be deleted +del_jmod_list="${scriptdir}/slim-java_jmod_del.list" +# bin files to be deleted +del_bin_list="${scriptdir}/slim-java_bin_del.list" +# lib files to be deleted +del_lib_list="${scriptdir}/slim-java_lib_del.list" + +# We only support 64 bit builds now +proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function parse_platform_specific() { + arch_info=$(uname -m) + + case "${arch_info}" in + aarch64) + echo "aarch64"; + ;; + ppc64el|ppc64le) + echo "ppc64le"; + ;; + s390x) + echo "s390x"; + ;; + amd64|x86_64) + echo "amd64"; + ;; + *) + echo "ERROR: Unknown platform"; + exit 1; + ;; + esac +} + +# Which vm implementation are we running on at the moment. +function get_vm_impl() { + impl="$(java -version 2>&1 | grep "OpenJ9")"; + if [ -n "${impl}" ]; then + echo "OpenJ9"; + else + echo "Hotspot"; + fi +} + +# Strip debug symbols from the given jar file. +function strip_debug_from_jar() { + jar=$1 + isSigned=$(jarsigner -verify "${jar}" | grep 'jar verified') + if [ "${isSigned}" == "" ]; then + echo " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}".new "${jar}" + mv "${jar}".new "${jar}" + fi +} + +# Trim the files in jre/lib dir +function jre_lib_files() { + echo -n "INFO: Trimming jre/lib dir..." + pushd "${target}"/jre/lib >/dev/null || return + rm -rf applet/ boot/ ddr/ deploy desktop/ endorsed/ + rm -rf images/icons/ locale/ oblique-fonts/ security/javaws.policy aggressive.jar deploy.jar javaws.jar jexec jlm.src.jar plugin.jar + pushd ext/ >/dev/null || return + rm -f dnsns.jar dtfj*.jar nashorn.jar traceformat.jar + popd >/dev/null || return + # Derive arch from current platorm. + lib_arch_dir=$(parse_platform_specific) + if [ -d "${lib_arch_dir}" ]; then + pushd "${lib_arch_dir}" >/dev/null || return + rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if [ "${proc_type}" == "64bit" ]; then + rm -rf default/ + fi + popd >/dev/null || return + fi + popd >/dev/null || return + echo "done" +} + +# Trim the files in the jre dir +function jre_files() { + echo -n "INFO: Trimming jre dir..." + pushd "${target}"/jre >/dev/null || return + rm -f ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README + rm -rf bin + ln -s ../bin bin + popd >/dev/null || return + echo "done" +} + +# Exclude the zOS specific charsets +function charset_files() { + + # 2.3 Special treat for removing ZOS specific charsets + echo -n "INFO: Trimming charsets..." + mkdir -p "${root}"/charsets_class + pushd "${root}"/charsets_class >/dev/null || return + jar -xf "${root}"/jre/lib/charsets.jar + ibmEbcdic="290 300 833 834 838 918 930 933 935 937 939 1025 1026 1046 1047 1097 1112 1122 1123 1364" + + # Generate sfj-excludes-charsets list as well. (OpenJ9 expects the file to be named sfj-excludes-charsets). + [ ! -e "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets ] || rm -rf "${root}"/jre/lib/sfj/sun/nio/cs/ext/sfj-excludes-charsets + exclude_charsets="" + + for charset in ${ibmEbcdic}; + do + rm -f sun/nio/cs/ext/IBM"${charset}".class + rm -f sun/nio/cs/ext/IBM"${charset}"\$*.class + + exclude_charsets="${exclude_charsets} IBM${charset}" + done + mkdir -p "${root}"/jre/lib/slim/sun/nio/cs/ext + echo "${exclude_charsets}" > "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets + cp "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets sun/nio/cs/ext/ + + jar -cfm "${root}"/jre/lib/charsets.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf "${root}"/charsets_class + echo "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function rt_jar_classes() { + # 2.4 Remove classes in rt.jar + echo -n "INFO: Trimming classes in rt.jar..." + mkdir -p "${root}"/rt_class + pushd "${root}"/rt_class >/dev/null || return + jar -xf "${root}"/jre/lib/rt.jar + mkdir -p "${root}"/rt_keep_class + grep -v '^#' < "${keep_list}" | while IFS= read -r class + do + cp --parents "${class}".class "${root}"/rt_keep_class/ >null 2>&1 + cp --parents "${class}"\$*.class "${root}"/rt_keep_class/ >null 2>&1 + done + + grep -v '^#' < "${del_list}" | while IFS= read -r class + do + rm -rf "${class}" + done + cp -rf "${root}"/rt_keep_class/* ./ + rm -rf "${root}"/rt_keep_class + + # 2.5. Restruct rt.jar + jar -cfm "${root}"/jre/lib/rt.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf rt_class + echo "done" +} + +# Strip the debug info from all jar files +function strip_jar() { + # pack200 is not available from Java 14 onwards + if [ "${java_major_version}" -ge 14 ]; then + return; + fi + # Using pack200 to strip debug info in jars + echo "INFO: Strip debug info from jar files" + list=$(find . -name "*.jar") + for jar in ${list}; + do + strip_debug_from_jar "${jar}" + done +} + +# Strip debug information from share libraries +function strip_bin() { + echo -n "INFO: Stripping debug info in object files..." + find bin -type f ! -path "./*"/java-rmi.cgi -exec strip -s {} \; + find . -name "*.so*" -exec strip -s {} \; + find . -name jexec -exec strip -s {} \; + echo "done" +} + +# Remove all debuginfo files +function debuginfo_files() { + echo -n "INFO: Removing all .debuginfo files..." + find . -name "*.debuginfo" -exec rm -f {} \; + echo "done" +} + +# Remove all src.zip files +function srczip_files() { + echo -n "INFO: Removing all src.zip files..." + find . -name "*src*zip" -exec rm -f {} \; + echo "done" +} + +# Remove unnecessary jmod files +function jmod_files() { + if [ ! -d "${target}"/jmods ]; then + return; + fi + pushd "${target}"/jmods >/dev/null || return + grep -v '^#' < "${del_jmod_list}" | while IFS= read -r jfile + do + rm -rf "${jfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools +function bin_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/bin >/dev/null || return + grep -v '^#' < "${del_bin_list}" | while IFS= read -r binfile + do + rm -rf "${binfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools and jars from lib dir +function lib_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/lib >/dev/null || return + grep -v '^#' < "${del_lib_list}" | while IFS= read -r libfile + do + rm -rf "${libfile}" + done + popd >/dev/null || return +} + +# Create a new target directory and copy over the source contents. +cd "${basedir}" || exit +mkdir -p "${target}" +echo "Copying ${src} to ${target}..." +cp -rf "${src}"/* "${target}"/ + +pushd "${target}" >/dev/null || exit + root=$(pwd) + echo "Trimming files..." + + # Remove examples documentation and sources. + rm -rf demo/ sample/ man/ + + # jre dir may not be present on all builds. + if [ -d "${target}"/jre ]; then + # Trim file in jre dir. + jre_files + + # Trim file in jre/lib dir. + jre_lib_files + + # Remove IBM zOS charset files. + # This needs extra code in sun/nio/cs/ext/ExtendedCharsets.class to + # ignore the charset files that are removed. Disabling for now until + # this gets added in the upstream openjdk project. + # charset_files + + # Trim unneeded rt.jar classes. + rt_jar_classes + fi + + # Strip all remaining jar files of debug info. + strip_jar + + # Strip object files of debug info. + strip_bin + + # Remove all debuginfo files + debuginfo_files + + # Remove all src.zip files + srczip_files + + # Remove unnecessary jmod files + jmod_files + + # Remove unnecessary tools and jars from lib dir + lib_files + + # Remove unnecessary tools + bin_files + + # Remove temp folders + rm -rf "${root}"/jre/lib/slim "${src}" +popd >/dev/null || exit + +mv "${target}" "${src}" +echo "Done" diff --git a/16/jdk/alpine/slim-java_bin_del.list b/16/jdk/alpine/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/alpine/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/alpine/slim-java_jmod_del.list b/16/jdk/alpine/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/alpine/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/alpine/slim-java_lib_del.list b/16/jdk/alpine/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/alpine/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/alpine/slim-java_rtjar_del.list b/16/jdk/alpine/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/alpine/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/alpine/slim-java_rtjar_keep.list b/16/jdk/alpine/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/alpine/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/centos/Dockerfile.hotspot.nightly.full b/16/jdk/centos/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..fb70678c2 --- /dev/null +++ b/16/jdk/centos/Dockerfile.hotspot.nightly.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/centos/Dockerfile.hotspot.nightly.slim b/16/jdk/centos/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..5d93e54b2 --- /dev/null +++ b/16/jdk/centos/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/centos/Dockerfile.hotspot.releases.full b/16/jdk/centos/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..7023d94d6 --- /dev/null +++ b/16/jdk/centos/Dockerfile.hotspot.releases.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/centos/Dockerfile.hotspot.releases.slim b/16/jdk/centos/Dockerfile.hotspot.releases.slim new file mode 100644 index 000000000..361b67004 --- /dev/null +++ b/16/jdk/centos/Dockerfile.hotspot.releases.slim @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/centos/Dockerfile.openj9.nightly.full b/16/jdk/centos/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..9614b8016 --- /dev/null +++ b/16/jdk/centos/Dockerfile.openj9.nightly.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/centos/Dockerfile.openj9.nightly.slim b/16/jdk/centos/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..a240a5eae --- /dev/null +++ b/16/jdk/centos/Dockerfile.openj9.nightly.slim @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/centos/Dockerfile.openj9.releases.full b/16/jdk/centos/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..4deabde1a --- /dev/null +++ b/16/jdk/centos/Dockerfile.openj9.releases.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/centos/Dockerfile.openj9.releases.slim b/16/jdk/centos/Dockerfile.openj9.releases.slim new file mode 100644 index 000000000..f5a9a540a --- /dev/null +++ b/16/jdk/centos/Dockerfile.openj9.releases.slim @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/centos/slim-java.sh b/16/jdk/centos/slim-java.sh new file mode 100755 index 000000000..2a6b612c4 --- /dev/null +++ b/16/jdk/centos/slim-java.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash +# +# 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. +# +set -o pipefail + +# Parse arguments +argc=$# +if [ ${argc} != 1 ]; then + message=$(basename "$0") + echo " Usage: ${message} Full-JDK-path" + exit 1 +fi + +# Which major java version +function get_java_version() { + # Only version 8 has the 1.8.0 format, all others have x.y.z-nnn where x is the major version + jver_string="$(java -version 2>&1 | grep "^openjdk version" | awk '{ print $3 }')" + ver_string="$(echo "${jver_string}" | awk -F'.' '{ print $1 }' | awk -F'"' '{ print $2 }')" + case "${ver_string}" in + 1) + java_major_version="8"; + ;; + *) + java_major_version="${ver_string}"; + ;; + esac +} + +# Set the java major version that we are on right now. +get_java_version + +# Validate prerequisites(tools) necessary for making a slim build +if [ "${java_major_version}" -ge 14 ]; then + tools="jar jarsigner strip" +else + tools="jar jarsigner pack200 strip" +fi + +for tool in ${tools}; +do + command -v "${tool}" >/dev/null 2>&1 || { echo >&2 "${tool} not found, please add ${tool} into PATH"; exit 1; } +done + +# Set input of this script +src="$1" +# Store necessary directories paths +basedir=$(dirname "${src}") +scriptdir=$(dirname "$0") +target="${basedir}"/slim + +# Files for Keep and Del list of classes in rt.jar +keep_list="${scriptdir}/slim-java_rtjar_keep.list" +del_list="${scriptdir}/slim-java_rtjar_del.list" +# jmod files to be deleted +del_jmod_list="${scriptdir}/slim-java_jmod_del.list" +# bin files to be deleted +del_bin_list="${scriptdir}/slim-java_bin_del.list" +# lib files to be deleted +del_lib_list="${scriptdir}/slim-java_lib_del.list" + +# We only support 64 bit builds now +proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function parse_platform_specific() { + arch_info=$(uname -m) + + case "${arch_info}" in + aarch64) + echo "aarch64"; + ;; + ppc64el|ppc64le) + echo "ppc64le"; + ;; + s390x) + echo "s390x"; + ;; + amd64|x86_64) + echo "amd64"; + ;; + *) + echo "ERROR: Unknown platform"; + exit 1; + ;; + esac +} + +# Which vm implementation are we running on at the moment. +function get_vm_impl() { + impl="$(java -version 2>&1 | grep "OpenJ9")"; + if [ -n "${impl}" ]; then + echo "OpenJ9"; + else + echo "Hotspot"; + fi +} + +# Strip debug symbols from the given jar file. +function strip_debug_from_jar() { + jar=$1 + isSigned=$(jarsigner -verify "${jar}" | grep 'jar verified') + if [ "${isSigned}" == "" ]; then + echo " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}".new "${jar}" + mv "${jar}".new "${jar}" + fi +} + +# Trim the files in jre/lib dir +function jre_lib_files() { + echo -n "INFO: Trimming jre/lib dir..." + pushd "${target}"/jre/lib >/dev/null || return + rm -rf applet/ boot/ ddr/ deploy desktop/ endorsed/ + rm -rf images/icons/ locale/ oblique-fonts/ security/javaws.policy aggressive.jar deploy.jar javaws.jar jexec jlm.src.jar plugin.jar + pushd ext/ >/dev/null || return + rm -f dnsns.jar dtfj*.jar nashorn.jar traceformat.jar + popd >/dev/null || return + # Derive arch from current platorm. + lib_arch_dir=$(parse_platform_specific) + if [ -d "${lib_arch_dir}" ]; then + pushd "${lib_arch_dir}" >/dev/null || return + rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if [ "${proc_type}" == "64bit" ]; then + rm -rf default/ + fi + popd >/dev/null || return + fi + popd >/dev/null || return + echo "done" +} + +# Trim the files in the jre dir +function jre_files() { + echo -n "INFO: Trimming jre dir..." + pushd "${target}"/jre >/dev/null || return + rm -f ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README + rm -rf bin + ln -s ../bin bin + popd >/dev/null || return + echo "done" +} + +# Exclude the zOS specific charsets +function charset_files() { + + # 2.3 Special treat for removing ZOS specific charsets + echo -n "INFO: Trimming charsets..." + mkdir -p "${root}"/charsets_class + pushd "${root}"/charsets_class >/dev/null || return + jar -xf "${root}"/jre/lib/charsets.jar + ibmEbcdic="290 300 833 834 838 918 930 933 935 937 939 1025 1026 1046 1047 1097 1112 1122 1123 1364" + + # Generate sfj-excludes-charsets list as well. (OpenJ9 expects the file to be named sfj-excludes-charsets). + [ ! -e "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets ] || rm -rf "${root}"/jre/lib/sfj/sun/nio/cs/ext/sfj-excludes-charsets + exclude_charsets="" + + for charset in ${ibmEbcdic}; + do + rm -f sun/nio/cs/ext/IBM"${charset}".class + rm -f sun/nio/cs/ext/IBM"${charset}"\$*.class + + exclude_charsets="${exclude_charsets} IBM${charset}" + done + mkdir -p "${root}"/jre/lib/slim/sun/nio/cs/ext + echo "${exclude_charsets}" > "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets + cp "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets sun/nio/cs/ext/ + + jar -cfm "${root}"/jre/lib/charsets.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf "${root}"/charsets_class + echo "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function rt_jar_classes() { + # 2.4 Remove classes in rt.jar + echo -n "INFO: Trimming classes in rt.jar..." + mkdir -p "${root}"/rt_class + pushd "${root}"/rt_class >/dev/null || return + jar -xf "${root}"/jre/lib/rt.jar + mkdir -p "${root}"/rt_keep_class + grep -v '^#' < "${keep_list}" | while IFS= read -r class + do + cp --parents "${class}".class "${root}"/rt_keep_class/ >null 2>&1 + cp --parents "${class}"\$*.class "${root}"/rt_keep_class/ >null 2>&1 + done + + grep -v '^#' < "${del_list}" | while IFS= read -r class + do + rm -rf "${class}" + done + cp -rf "${root}"/rt_keep_class/* ./ + rm -rf "${root}"/rt_keep_class + + # 2.5. Restruct rt.jar + jar -cfm "${root}"/jre/lib/rt.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf rt_class + echo "done" +} + +# Strip the debug info from all jar files +function strip_jar() { + # pack200 is not available from Java 14 onwards + if [ "${java_major_version}" -ge 14 ]; then + return; + fi + # Using pack200 to strip debug info in jars + echo "INFO: Strip debug info from jar files" + list=$(find . -name "*.jar") + for jar in ${list}; + do + strip_debug_from_jar "${jar}" + done +} + +# Strip debug information from share libraries +function strip_bin() { + echo -n "INFO: Stripping debug info in object files..." + find bin -type f ! -path "./*"/java-rmi.cgi -exec strip -s {} \; + find . -name "*.so*" -exec strip -s {} \; + find . -name jexec -exec strip -s {} \; + echo "done" +} + +# Remove all debuginfo files +function debuginfo_files() { + echo -n "INFO: Removing all .debuginfo files..." + find . -name "*.debuginfo" -exec rm -f {} \; + echo "done" +} + +# Remove all src.zip files +function srczip_files() { + echo -n "INFO: Removing all src.zip files..." + find . -name "*src*zip" -exec rm -f {} \; + echo "done" +} + +# Remove unnecessary jmod files +function jmod_files() { + if [ ! -d "${target}"/jmods ]; then + return; + fi + pushd "${target}"/jmods >/dev/null || return + grep -v '^#' < "${del_jmod_list}" | while IFS= read -r jfile + do + rm -rf "${jfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools +function bin_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/bin >/dev/null || return + grep -v '^#' < "${del_bin_list}" | while IFS= read -r binfile + do + rm -rf "${binfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools and jars from lib dir +function lib_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/lib >/dev/null || return + grep -v '^#' < "${del_lib_list}" | while IFS= read -r libfile + do + rm -rf "${libfile}" + done + popd >/dev/null || return +} + +# Create a new target directory and copy over the source contents. +cd "${basedir}" || exit +mkdir -p "${target}" +echo "Copying ${src} to ${target}..." +cp -rf "${src}"/* "${target}"/ + +pushd "${target}" >/dev/null || exit + root=$(pwd) + echo "Trimming files..." + + # Remove examples documentation and sources. + rm -rf demo/ sample/ man/ + + # jre dir may not be present on all builds. + if [ -d "${target}"/jre ]; then + # Trim file in jre dir. + jre_files + + # Trim file in jre/lib dir. + jre_lib_files + + # Remove IBM zOS charset files. + # This needs extra code in sun/nio/cs/ext/ExtendedCharsets.class to + # ignore the charset files that are removed. Disabling for now until + # this gets added in the upstream openjdk project. + # charset_files + + # Trim unneeded rt.jar classes. + rt_jar_classes + fi + + # Strip all remaining jar files of debug info. + strip_jar + + # Strip object files of debug info. + strip_bin + + # Remove all debuginfo files + debuginfo_files + + # Remove all src.zip files + srczip_files + + # Remove unnecessary jmod files + jmod_files + + # Remove unnecessary tools and jars from lib dir + lib_files + + # Remove unnecessary tools + bin_files + + # Remove temp folders + rm -rf "${root}"/jre/lib/slim "${src}" +popd >/dev/null || exit + +mv "${target}" "${src}" +echo "Done" diff --git a/16/jdk/centos/slim-java_bin_del.list b/16/jdk/centos/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/centos/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/centos/slim-java_jmod_del.list b/16/jdk/centos/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/centos/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/centos/slim-java_lib_del.list b/16/jdk/centos/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/centos/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/centos/slim-java_rtjar_del.list b/16/jdk/centos/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/centos/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/centos/slim-java_rtjar_keep.list b/16/jdk/centos/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/centos/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/clefos/Dockerfile.hotspot.nightly.full b/16/jdk/clefos/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..a83e8f418 --- /dev/null +++ b/16/jdk/clefos/Dockerfile.hotspot.nightly.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/clefos/Dockerfile.hotspot.nightly.slim b/16/jdk/clefos/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..8d9979896 --- /dev/null +++ b/16/jdk/clefos/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/clefos/Dockerfile.hotspot.releases.full b/16/jdk/clefos/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..3b904f89b --- /dev/null +++ b/16/jdk/clefos/Dockerfile.hotspot.releases.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/clefos/Dockerfile.hotspot.releases.slim b/16/jdk/clefos/Dockerfile.hotspot.releases.slim new file mode 100644 index 000000000..d80eeda98 --- /dev/null +++ b/16/jdk/clefos/Dockerfile.hotspot.releases.slim @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/clefos/Dockerfile.openj9.nightly.full b/16/jdk/clefos/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..3172dc1b7 --- /dev/null +++ b/16/jdk/clefos/Dockerfile.openj9.nightly.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/clefos/Dockerfile.openj9.nightly.slim b/16/jdk/clefos/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..6d1ba790f --- /dev/null +++ b/16/jdk/clefos/Dockerfile.openj9.nightly.slim @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/clefos/Dockerfile.openj9.releases.full b/16/jdk/clefos/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..ecc53ae02 --- /dev/null +++ b/16/jdk/clefos/Dockerfile.openj9.releases.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/clefos/Dockerfile.openj9.releases.slim b/16/jdk/clefos/Dockerfile.openj9.releases.slim new file mode 100644 index 000000000..1fa3d3956 --- /dev/null +++ b/16/jdk/clefos/Dockerfile.openj9.releases.slim @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/clefos/slim-java.sh b/16/jdk/clefos/slim-java.sh new file mode 100755 index 000000000..2a6b612c4 --- /dev/null +++ b/16/jdk/clefos/slim-java.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash +# +# 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. +# +set -o pipefail + +# Parse arguments +argc=$# +if [ ${argc} != 1 ]; then + message=$(basename "$0") + echo " Usage: ${message} Full-JDK-path" + exit 1 +fi + +# Which major java version +function get_java_version() { + # Only version 8 has the 1.8.0 format, all others have x.y.z-nnn where x is the major version + jver_string="$(java -version 2>&1 | grep "^openjdk version" | awk '{ print $3 }')" + ver_string="$(echo "${jver_string}" | awk -F'.' '{ print $1 }' | awk -F'"' '{ print $2 }')" + case "${ver_string}" in + 1) + java_major_version="8"; + ;; + *) + java_major_version="${ver_string}"; + ;; + esac +} + +# Set the java major version that we are on right now. +get_java_version + +# Validate prerequisites(tools) necessary for making a slim build +if [ "${java_major_version}" -ge 14 ]; then + tools="jar jarsigner strip" +else + tools="jar jarsigner pack200 strip" +fi + +for tool in ${tools}; +do + command -v "${tool}" >/dev/null 2>&1 || { echo >&2 "${tool} not found, please add ${tool} into PATH"; exit 1; } +done + +# Set input of this script +src="$1" +# Store necessary directories paths +basedir=$(dirname "${src}") +scriptdir=$(dirname "$0") +target="${basedir}"/slim + +# Files for Keep and Del list of classes in rt.jar +keep_list="${scriptdir}/slim-java_rtjar_keep.list" +del_list="${scriptdir}/slim-java_rtjar_del.list" +# jmod files to be deleted +del_jmod_list="${scriptdir}/slim-java_jmod_del.list" +# bin files to be deleted +del_bin_list="${scriptdir}/slim-java_bin_del.list" +# lib files to be deleted +del_lib_list="${scriptdir}/slim-java_lib_del.list" + +# We only support 64 bit builds now +proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function parse_platform_specific() { + arch_info=$(uname -m) + + case "${arch_info}" in + aarch64) + echo "aarch64"; + ;; + ppc64el|ppc64le) + echo "ppc64le"; + ;; + s390x) + echo "s390x"; + ;; + amd64|x86_64) + echo "amd64"; + ;; + *) + echo "ERROR: Unknown platform"; + exit 1; + ;; + esac +} + +# Which vm implementation are we running on at the moment. +function get_vm_impl() { + impl="$(java -version 2>&1 | grep "OpenJ9")"; + if [ -n "${impl}" ]; then + echo "OpenJ9"; + else + echo "Hotspot"; + fi +} + +# Strip debug symbols from the given jar file. +function strip_debug_from_jar() { + jar=$1 + isSigned=$(jarsigner -verify "${jar}" | grep 'jar verified') + if [ "${isSigned}" == "" ]; then + echo " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}".new "${jar}" + mv "${jar}".new "${jar}" + fi +} + +# Trim the files in jre/lib dir +function jre_lib_files() { + echo -n "INFO: Trimming jre/lib dir..." + pushd "${target}"/jre/lib >/dev/null || return + rm -rf applet/ boot/ ddr/ deploy desktop/ endorsed/ + rm -rf images/icons/ locale/ oblique-fonts/ security/javaws.policy aggressive.jar deploy.jar javaws.jar jexec jlm.src.jar plugin.jar + pushd ext/ >/dev/null || return + rm -f dnsns.jar dtfj*.jar nashorn.jar traceformat.jar + popd >/dev/null || return + # Derive arch from current platorm. + lib_arch_dir=$(parse_platform_specific) + if [ -d "${lib_arch_dir}" ]; then + pushd "${lib_arch_dir}" >/dev/null || return + rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if [ "${proc_type}" == "64bit" ]; then + rm -rf default/ + fi + popd >/dev/null || return + fi + popd >/dev/null || return + echo "done" +} + +# Trim the files in the jre dir +function jre_files() { + echo -n "INFO: Trimming jre dir..." + pushd "${target}"/jre >/dev/null || return + rm -f ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README + rm -rf bin + ln -s ../bin bin + popd >/dev/null || return + echo "done" +} + +# Exclude the zOS specific charsets +function charset_files() { + + # 2.3 Special treat for removing ZOS specific charsets + echo -n "INFO: Trimming charsets..." + mkdir -p "${root}"/charsets_class + pushd "${root}"/charsets_class >/dev/null || return + jar -xf "${root}"/jre/lib/charsets.jar + ibmEbcdic="290 300 833 834 838 918 930 933 935 937 939 1025 1026 1046 1047 1097 1112 1122 1123 1364" + + # Generate sfj-excludes-charsets list as well. (OpenJ9 expects the file to be named sfj-excludes-charsets). + [ ! -e "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets ] || rm -rf "${root}"/jre/lib/sfj/sun/nio/cs/ext/sfj-excludes-charsets + exclude_charsets="" + + for charset in ${ibmEbcdic}; + do + rm -f sun/nio/cs/ext/IBM"${charset}".class + rm -f sun/nio/cs/ext/IBM"${charset}"\$*.class + + exclude_charsets="${exclude_charsets} IBM${charset}" + done + mkdir -p "${root}"/jre/lib/slim/sun/nio/cs/ext + echo "${exclude_charsets}" > "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets + cp "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets sun/nio/cs/ext/ + + jar -cfm "${root}"/jre/lib/charsets.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf "${root}"/charsets_class + echo "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function rt_jar_classes() { + # 2.4 Remove classes in rt.jar + echo -n "INFO: Trimming classes in rt.jar..." + mkdir -p "${root}"/rt_class + pushd "${root}"/rt_class >/dev/null || return + jar -xf "${root}"/jre/lib/rt.jar + mkdir -p "${root}"/rt_keep_class + grep -v '^#' < "${keep_list}" | while IFS= read -r class + do + cp --parents "${class}".class "${root}"/rt_keep_class/ >null 2>&1 + cp --parents "${class}"\$*.class "${root}"/rt_keep_class/ >null 2>&1 + done + + grep -v '^#' < "${del_list}" | while IFS= read -r class + do + rm -rf "${class}" + done + cp -rf "${root}"/rt_keep_class/* ./ + rm -rf "${root}"/rt_keep_class + + # 2.5. Restruct rt.jar + jar -cfm "${root}"/jre/lib/rt.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf rt_class + echo "done" +} + +# Strip the debug info from all jar files +function strip_jar() { + # pack200 is not available from Java 14 onwards + if [ "${java_major_version}" -ge 14 ]; then + return; + fi + # Using pack200 to strip debug info in jars + echo "INFO: Strip debug info from jar files" + list=$(find . -name "*.jar") + for jar in ${list}; + do + strip_debug_from_jar "${jar}" + done +} + +# Strip debug information from share libraries +function strip_bin() { + echo -n "INFO: Stripping debug info in object files..." + find bin -type f ! -path "./*"/java-rmi.cgi -exec strip -s {} \; + find . -name "*.so*" -exec strip -s {} \; + find . -name jexec -exec strip -s {} \; + echo "done" +} + +# Remove all debuginfo files +function debuginfo_files() { + echo -n "INFO: Removing all .debuginfo files..." + find . -name "*.debuginfo" -exec rm -f {} \; + echo "done" +} + +# Remove all src.zip files +function srczip_files() { + echo -n "INFO: Removing all src.zip files..." + find . -name "*src*zip" -exec rm -f {} \; + echo "done" +} + +# Remove unnecessary jmod files +function jmod_files() { + if [ ! -d "${target}"/jmods ]; then + return; + fi + pushd "${target}"/jmods >/dev/null || return + grep -v '^#' < "${del_jmod_list}" | while IFS= read -r jfile + do + rm -rf "${jfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools +function bin_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/bin >/dev/null || return + grep -v '^#' < "${del_bin_list}" | while IFS= read -r binfile + do + rm -rf "${binfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools and jars from lib dir +function lib_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/lib >/dev/null || return + grep -v '^#' < "${del_lib_list}" | while IFS= read -r libfile + do + rm -rf "${libfile}" + done + popd >/dev/null || return +} + +# Create a new target directory and copy over the source contents. +cd "${basedir}" || exit +mkdir -p "${target}" +echo "Copying ${src} to ${target}..." +cp -rf "${src}"/* "${target}"/ + +pushd "${target}" >/dev/null || exit + root=$(pwd) + echo "Trimming files..." + + # Remove examples documentation and sources. + rm -rf demo/ sample/ man/ + + # jre dir may not be present on all builds. + if [ -d "${target}"/jre ]; then + # Trim file in jre dir. + jre_files + + # Trim file in jre/lib dir. + jre_lib_files + + # Remove IBM zOS charset files. + # This needs extra code in sun/nio/cs/ext/ExtendedCharsets.class to + # ignore the charset files that are removed. Disabling for now until + # this gets added in the upstream openjdk project. + # charset_files + + # Trim unneeded rt.jar classes. + rt_jar_classes + fi + + # Strip all remaining jar files of debug info. + strip_jar + + # Strip object files of debug info. + strip_bin + + # Remove all debuginfo files + debuginfo_files + + # Remove all src.zip files + srczip_files + + # Remove unnecessary jmod files + jmod_files + + # Remove unnecessary tools and jars from lib dir + lib_files + + # Remove unnecessary tools + bin_files + + # Remove temp folders + rm -rf "${root}"/jre/lib/slim "${src}" +popd >/dev/null || exit + +mv "${target}" "${src}" +echo "Done" diff --git a/16/jdk/clefos/slim-java_bin_del.list b/16/jdk/clefos/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/clefos/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/clefos/slim-java_jmod_del.list b/16/jdk/clefos/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/clefos/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/clefos/slim-java_lib_del.list b/16/jdk/clefos/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/clefos/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/clefos/slim-java_rtjar_del.list b/16/jdk/clefos/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/clefos/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/clefos/slim-java_rtjar_keep.list b/16/jdk/clefos/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/clefos/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/debian/Dockerfile.hotspot.nightly.full b/16/jdk/debian/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..e555cff7c --- /dev/null +++ b/16/jdk/debian/Dockerfile.hotspot.nightly.full @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debian/Dockerfile.hotspot.nightly.slim b/16/jdk/debian/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..4d8f97570 --- /dev/null +++ b/16/jdk/debian/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debian/Dockerfile.hotspot.releases.full b/16/jdk/debian/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..1de4ca357 --- /dev/null +++ b/16/jdk/debian/Dockerfile.hotspot.releases.full @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debian/Dockerfile.hotspot.releases.slim b/16/jdk/debian/Dockerfile.hotspot.releases.slim new file mode 100644 index 000000000..0a604644c --- /dev/null +++ b/16/jdk/debian/Dockerfile.hotspot.releases.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debian/Dockerfile.openj9.nightly.full b/16/jdk/debian/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..829d3be14 --- /dev/null +++ b/16/jdk/debian/Dockerfile.openj9.nightly.full @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debian/Dockerfile.openj9.nightly.slim b/16/jdk/debian/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..9660f1c09 --- /dev/null +++ b/16/jdk/debian/Dockerfile.openj9.nightly.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debian/Dockerfile.openj9.releases.full b/16/jdk/debian/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..edc212456 --- /dev/null +++ b/16/jdk/debian/Dockerfile.openj9.releases.full @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debian/Dockerfile.openj9.releases.slim b/16/jdk/debian/Dockerfile.openj9.releases.slim new file mode 100644 index 000000000..2ab8cc321 --- /dev/null +++ b/16/jdk/debian/Dockerfile.openj9.releases.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debian/slim-java.sh b/16/jdk/debian/slim-java.sh new file mode 100755 index 000000000..2a6b612c4 --- /dev/null +++ b/16/jdk/debian/slim-java.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash +# +# 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. +# +set -o pipefail + +# Parse arguments +argc=$# +if [ ${argc} != 1 ]; then + message=$(basename "$0") + echo " Usage: ${message} Full-JDK-path" + exit 1 +fi + +# Which major java version +function get_java_version() { + # Only version 8 has the 1.8.0 format, all others have x.y.z-nnn where x is the major version + jver_string="$(java -version 2>&1 | grep "^openjdk version" | awk '{ print $3 }')" + ver_string="$(echo "${jver_string}" | awk -F'.' '{ print $1 }' | awk -F'"' '{ print $2 }')" + case "${ver_string}" in + 1) + java_major_version="8"; + ;; + *) + java_major_version="${ver_string}"; + ;; + esac +} + +# Set the java major version that we are on right now. +get_java_version + +# Validate prerequisites(tools) necessary for making a slim build +if [ "${java_major_version}" -ge 14 ]; then + tools="jar jarsigner strip" +else + tools="jar jarsigner pack200 strip" +fi + +for tool in ${tools}; +do + command -v "${tool}" >/dev/null 2>&1 || { echo >&2 "${tool} not found, please add ${tool} into PATH"; exit 1; } +done + +# Set input of this script +src="$1" +# Store necessary directories paths +basedir=$(dirname "${src}") +scriptdir=$(dirname "$0") +target="${basedir}"/slim + +# Files for Keep and Del list of classes in rt.jar +keep_list="${scriptdir}/slim-java_rtjar_keep.list" +del_list="${scriptdir}/slim-java_rtjar_del.list" +# jmod files to be deleted +del_jmod_list="${scriptdir}/slim-java_jmod_del.list" +# bin files to be deleted +del_bin_list="${scriptdir}/slim-java_bin_del.list" +# lib files to be deleted +del_lib_list="${scriptdir}/slim-java_lib_del.list" + +# We only support 64 bit builds now +proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function parse_platform_specific() { + arch_info=$(uname -m) + + case "${arch_info}" in + aarch64) + echo "aarch64"; + ;; + ppc64el|ppc64le) + echo "ppc64le"; + ;; + s390x) + echo "s390x"; + ;; + amd64|x86_64) + echo "amd64"; + ;; + *) + echo "ERROR: Unknown platform"; + exit 1; + ;; + esac +} + +# Which vm implementation are we running on at the moment. +function get_vm_impl() { + impl="$(java -version 2>&1 | grep "OpenJ9")"; + if [ -n "${impl}" ]; then + echo "OpenJ9"; + else + echo "Hotspot"; + fi +} + +# Strip debug symbols from the given jar file. +function strip_debug_from_jar() { + jar=$1 + isSigned=$(jarsigner -verify "${jar}" | grep 'jar verified') + if [ "${isSigned}" == "" ]; then + echo " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}".new "${jar}" + mv "${jar}".new "${jar}" + fi +} + +# Trim the files in jre/lib dir +function jre_lib_files() { + echo -n "INFO: Trimming jre/lib dir..." + pushd "${target}"/jre/lib >/dev/null || return + rm -rf applet/ boot/ ddr/ deploy desktop/ endorsed/ + rm -rf images/icons/ locale/ oblique-fonts/ security/javaws.policy aggressive.jar deploy.jar javaws.jar jexec jlm.src.jar plugin.jar + pushd ext/ >/dev/null || return + rm -f dnsns.jar dtfj*.jar nashorn.jar traceformat.jar + popd >/dev/null || return + # Derive arch from current platorm. + lib_arch_dir=$(parse_platform_specific) + if [ -d "${lib_arch_dir}" ]; then + pushd "${lib_arch_dir}" >/dev/null || return + rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if [ "${proc_type}" == "64bit" ]; then + rm -rf default/ + fi + popd >/dev/null || return + fi + popd >/dev/null || return + echo "done" +} + +# Trim the files in the jre dir +function jre_files() { + echo -n "INFO: Trimming jre dir..." + pushd "${target}"/jre >/dev/null || return + rm -f ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README + rm -rf bin + ln -s ../bin bin + popd >/dev/null || return + echo "done" +} + +# Exclude the zOS specific charsets +function charset_files() { + + # 2.3 Special treat for removing ZOS specific charsets + echo -n "INFO: Trimming charsets..." + mkdir -p "${root}"/charsets_class + pushd "${root}"/charsets_class >/dev/null || return + jar -xf "${root}"/jre/lib/charsets.jar + ibmEbcdic="290 300 833 834 838 918 930 933 935 937 939 1025 1026 1046 1047 1097 1112 1122 1123 1364" + + # Generate sfj-excludes-charsets list as well. (OpenJ9 expects the file to be named sfj-excludes-charsets). + [ ! -e "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets ] || rm -rf "${root}"/jre/lib/sfj/sun/nio/cs/ext/sfj-excludes-charsets + exclude_charsets="" + + for charset in ${ibmEbcdic}; + do + rm -f sun/nio/cs/ext/IBM"${charset}".class + rm -f sun/nio/cs/ext/IBM"${charset}"\$*.class + + exclude_charsets="${exclude_charsets} IBM${charset}" + done + mkdir -p "${root}"/jre/lib/slim/sun/nio/cs/ext + echo "${exclude_charsets}" > "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets + cp "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets sun/nio/cs/ext/ + + jar -cfm "${root}"/jre/lib/charsets.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf "${root}"/charsets_class + echo "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function rt_jar_classes() { + # 2.4 Remove classes in rt.jar + echo -n "INFO: Trimming classes in rt.jar..." + mkdir -p "${root}"/rt_class + pushd "${root}"/rt_class >/dev/null || return + jar -xf "${root}"/jre/lib/rt.jar + mkdir -p "${root}"/rt_keep_class + grep -v '^#' < "${keep_list}" | while IFS= read -r class + do + cp --parents "${class}".class "${root}"/rt_keep_class/ >null 2>&1 + cp --parents "${class}"\$*.class "${root}"/rt_keep_class/ >null 2>&1 + done + + grep -v '^#' < "${del_list}" | while IFS= read -r class + do + rm -rf "${class}" + done + cp -rf "${root}"/rt_keep_class/* ./ + rm -rf "${root}"/rt_keep_class + + # 2.5. Restruct rt.jar + jar -cfm "${root}"/jre/lib/rt.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf rt_class + echo "done" +} + +# Strip the debug info from all jar files +function strip_jar() { + # pack200 is not available from Java 14 onwards + if [ "${java_major_version}" -ge 14 ]; then + return; + fi + # Using pack200 to strip debug info in jars + echo "INFO: Strip debug info from jar files" + list=$(find . -name "*.jar") + for jar in ${list}; + do + strip_debug_from_jar "${jar}" + done +} + +# Strip debug information from share libraries +function strip_bin() { + echo -n "INFO: Stripping debug info in object files..." + find bin -type f ! -path "./*"/java-rmi.cgi -exec strip -s {} \; + find . -name "*.so*" -exec strip -s {} \; + find . -name jexec -exec strip -s {} \; + echo "done" +} + +# Remove all debuginfo files +function debuginfo_files() { + echo -n "INFO: Removing all .debuginfo files..." + find . -name "*.debuginfo" -exec rm -f {} \; + echo "done" +} + +# Remove all src.zip files +function srczip_files() { + echo -n "INFO: Removing all src.zip files..." + find . -name "*src*zip" -exec rm -f {} \; + echo "done" +} + +# Remove unnecessary jmod files +function jmod_files() { + if [ ! -d "${target}"/jmods ]; then + return; + fi + pushd "${target}"/jmods >/dev/null || return + grep -v '^#' < "${del_jmod_list}" | while IFS= read -r jfile + do + rm -rf "${jfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools +function bin_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/bin >/dev/null || return + grep -v '^#' < "${del_bin_list}" | while IFS= read -r binfile + do + rm -rf "${binfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools and jars from lib dir +function lib_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/lib >/dev/null || return + grep -v '^#' < "${del_lib_list}" | while IFS= read -r libfile + do + rm -rf "${libfile}" + done + popd >/dev/null || return +} + +# Create a new target directory and copy over the source contents. +cd "${basedir}" || exit +mkdir -p "${target}" +echo "Copying ${src} to ${target}..." +cp -rf "${src}"/* "${target}"/ + +pushd "${target}" >/dev/null || exit + root=$(pwd) + echo "Trimming files..." + + # Remove examples documentation and sources. + rm -rf demo/ sample/ man/ + + # jre dir may not be present on all builds. + if [ -d "${target}"/jre ]; then + # Trim file in jre dir. + jre_files + + # Trim file in jre/lib dir. + jre_lib_files + + # Remove IBM zOS charset files. + # This needs extra code in sun/nio/cs/ext/ExtendedCharsets.class to + # ignore the charset files that are removed. Disabling for now until + # this gets added in the upstream openjdk project. + # charset_files + + # Trim unneeded rt.jar classes. + rt_jar_classes + fi + + # Strip all remaining jar files of debug info. + strip_jar + + # Strip object files of debug info. + strip_bin + + # Remove all debuginfo files + debuginfo_files + + # Remove all src.zip files + srczip_files + + # Remove unnecessary jmod files + jmod_files + + # Remove unnecessary tools and jars from lib dir + lib_files + + # Remove unnecessary tools + bin_files + + # Remove temp folders + rm -rf "${root}"/jre/lib/slim "${src}" +popd >/dev/null || exit + +mv "${target}" "${src}" +echo "Done" diff --git a/16/jdk/debian/slim-java_bin_del.list b/16/jdk/debian/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/debian/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/debian/slim-java_jmod_del.list b/16/jdk/debian/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/debian/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/debian/slim-java_lib_del.list b/16/jdk/debian/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/debian/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/debian/slim-java_rtjar_del.list b/16/jdk/debian/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/debian/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/debian/slim-java_rtjar_keep.list b/16/jdk/debian/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/debian/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/debianslim/Dockerfile.hotspot.nightly.full b/16/jdk/debianslim/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..8e913e550 --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.hotspot.nightly.full @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debianslim/Dockerfile.hotspot.nightly.slim b/16/jdk/debianslim/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..8c62a4687 --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debianslim/Dockerfile.hotspot.releases.full b/16/jdk/debianslim/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..1bc1516b6 --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.hotspot.releases.full @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debianslim/Dockerfile.hotspot.releases.slim b/16/jdk/debianslim/Dockerfile.hotspot.releases.slim new file mode 100644 index 000000000..a0686d2ce --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.hotspot.releases.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/debianslim/Dockerfile.openj9.nightly.full b/16/jdk/debianslim/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..28ebba2e9 --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.openj9.nightly.full @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debianslim/Dockerfile.openj9.nightly.slim b/16/jdk/debianslim/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..db7485b3e --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.openj9.nightly.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debianslim/Dockerfile.openj9.releases.full b/16/jdk/debianslim/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..d8df2ea49 --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.openj9.releases.full @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debianslim/Dockerfile.openj9.releases.slim b/16/jdk/debianslim/Dockerfile.openj9.releases.slim new file mode 100644 index 000000000..841cae53b --- /dev/null +++ b/16/jdk/debianslim/Dockerfile.openj9.releases.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/debianslim/slim-java.sh b/16/jdk/debianslim/slim-java.sh new file mode 100755 index 000000000..2a6b612c4 --- /dev/null +++ b/16/jdk/debianslim/slim-java.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash +# +# 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. +# +set -o pipefail + +# Parse arguments +argc=$# +if [ ${argc} != 1 ]; then + message=$(basename "$0") + echo " Usage: ${message} Full-JDK-path" + exit 1 +fi + +# Which major java version +function get_java_version() { + # Only version 8 has the 1.8.0 format, all others have x.y.z-nnn where x is the major version + jver_string="$(java -version 2>&1 | grep "^openjdk version" | awk '{ print $3 }')" + ver_string="$(echo "${jver_string}" | awk -F'.' '{ print $1 }' | awk -F'"' '{ print $2 }')" + case "${ver_string}" in + 1) + java_major_version="8"; + ;; + *) + java_major_version="${ver_string}"; + ;; + esac +} + +# Set the java major version that we are on right now. +get_java_version + +# Validate prerequisites(tools) necessary for making a slim build +if [ "${java_major_version}" -ge 14 ]; then + tools="jar jarsigner strip" +else + tools="jar jarsigner pack200 strip" +fi + +for tool in ${tools}; +do + command -v "${tool}" >/dev/null 2>&1 || { echo >&2 "${tool} not found, please add ${tool} into PATH"; exit 1; } +done + +# Set input of this script +src="$1" +# Store necessary directories paths +basedir=$(dirname "${src}") +scriptdir=$(dirname "$0") +target="${basedir}"/slim + +# Files for Keep and Del list of classes in rt.jar +keep_list="${scriptdir}/slim-java_rtjar_keep.list" +del_list="${scriptdir}/slim-java_rtjar_del.list" +# jmod files to be deleted +del_jmod_list="${scriptdir}/slim-java_jmod_del.list" +# bin files to be deleted +del_bin_list="${scriptdir}/slim-java_bin_del.list" +# lib files to be deleted +del_lib_list="${scriptdir}/slim-java_lib_del.list" + +# We only support 64 bit builds now +proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function parse_platform_specific() { + arch_info=$(uname -m) + + case "${arch_info}" in + aarch64) + echo "aarch64"; + ;; + ppc64el|ppc64le) + echo "ppc64le"; + ;; + s390x) + echo "s390x"; + ;; + amd64|x86_64) + echo "amd64"; + ;; + *) + echo "ERROR: Unknown platform"; + exit 1; + ;; + esac +} + +# Which vm implementation are we running on at the moment. +function get_vm_impl() { + impl="$(java -version 2>&1 | grep "OpenJ9")"; + if [ -n "${impl}" ]; then + echo "OpenJ9"; + else + echo "Hotspot"; + fi +} + +# Strip debug symbols from the given jar file. +function strip_debug_from_jar() { + jar=$1 + isSigned=$(jarsigner -verify "${jar}" | grep 'jar verified') + if [ "${isSigned}" == "" ]; then + echo " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}".new "${jar}" + mv "${jar}".new "${jar}" + fi +} + +# Trim the files in jre/lib dir +function jre_lib_files() { + echo -n "INFO: Trimming jre/lib dir..." + pushd "${target}"/jre/lib >/dev/null || return + rm -rf applet/ boot/ ddr/ deploy desktop/ endorsed/ + rm -rf images/icons/ locale/ oblique-fonts/ security/javaws.policy aggressive.jar deploy.jar javaws.jar jexec jlm.src.jar plugin.jar + pushd ext/ >/dev/null || return + rm -f dnsns.jar dtfj*.jar nashorn.jar traceformat.jar + popd >/dev/null || return + # Derive arch from current platorm. + lib_arch_dir=$(parse_platform_specific) + if [ -d "${lib_arch_dir}" ]; then + pushd "${lib_arch_dir}" >/dev/null || return + rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if [ "${proc_type}" == "64bit" ]; then + rm -rf default/ + fi + popd >/dev/null || return + fi + popd >/dev/null || return + echo "done" +} + +# Trim the files in the jre dir +function jre_files() { + echo -n "INFO: Trimming jre dir..." + pushd "${target}"/jre >/dev/null || return + rm -f ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README + rm -rf bin + ln -s ../bin bin + popd >/dev/null || return + echo "done" +} + +# Exclude the zOS specific charsets +function charset_files() { + + # 2.3 Special treat for removing ZOS specific charsets + echo -n "INFO: Trimming charsets..." + mkdir -p "${root}"/charsets_class + pushd "${root}"/charsets_class >/dev/null || return + jar -xf "${root}"/jre/lib/charsets.jar + ibmEbcdic="290 300 833 834 838 918 930 933 935 937 939 1025 1026 1046 1047 1097 1112 1122 1123 1364" + + # Generate sfj-excludes-charsets list as well. (OpenJ9 expects the file to be named sfj-excludes-charsets). + [ ! -e "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets ] || rm -rf "${root}"/jre/lib/sfj/sun/nio/cs/ext/sfj-excludes-charsets + exclude_charsets="" + + for charset in ${ibmEbcdic}; + do + rm -f sun/nio/cs/ext/IBM"${charset}".class + rm -f sun/nio/cs/ext/IBM"${charset}"\$*.class + + exclude_charsets="${exclude_charsets} IBM${charset}" + done + mkdir -p "${root}"/jre/lib/slim/sun/nio/cs/ext + echo "${exclude_charsets}" > "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets + cp "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets sun/nio/cs/ext/ + + jar -cfm "${root}"/jre/lib/charsets.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf "${root}"/charsets_class + echo "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function rt_jar_classes() { + # 2.4 Remove classes in rt.jar + echo -n "INFO: Trimming classes in rt.jar..." + mkdir -p "${root}"/rt_class + pushd "${root}"/rt_class >/dev/null || return + jar -xf "${root}"/jre/lib/rt.jar + mkdir -p "${root}"/rt_keep_class + grep -v '^#' < "${keep_list}" | while IFS= read -r class + do + cp --parents "${class}".class "${root}"/rt_keep_class/ >null 2>&1 + cp --parents "${class}"\$*.class "${root}"/rt_keep_class/ >null 2>&1 + done + + grep -v '^#' < "${del_list}" | while IFS= read -r class + do + rm -rf "${class}" + done + cp -rf "${root}"/rt_keep_class/* ./ + rm -rf "${root}"/rt_keep_class + + # 2.5. Restruct rt.jar + jar -cfm "${root}"/jre/lib/rt.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf rt_class + echo "done" +} + +# Strip the debug info from all jar files +function strip_jar() { + # pack200 is not available from Java 14 onwards + if [ "${java_major_version}" -ge 14 ]; then + return; + fi + # Using pack200 to strip debug info in jars + echo "INFO: Strip debug info from jar files" + list=$(find . -name "*.jar") + for jar in ${list}; + do + strip_debug_from_jar "${jar}" + done +} + +# Strip debug information from share libraries +function strip_bin() { + echo -n "INFO: Stripping debug info in object files..." + find bin -type f ! -path "./*"/java-rmi.cgi -exec strip -s {} \; + find . -name "*.so*" -exec strip -s {} \; + find . -name jexec -exec strip -s {} \; + echo "done" +} + +# Remove all debuginfo files +function debuginfo_files() { + echo -n "INFO: Removing all .debuginfo files..." + find . -name "*.debuginfo" -exec rm -f {} \; + echo "done" +} + +# Remove all src.zip files +function srczip_files() { + echo -n "INFO: Removing all src.zip files..." + find . -name "*src*zip" -exec rm -f {} \; + echo "done" +} + +# Remove unnecessary jmod files +function jmod_files() { + if [ ! -d "${target}"/jmods ]; then + return; + fi + pushd "${target}"/jmods >/dev/null || return + grep -v '^#' < "${del_jmod_list}" | while IFS= read -r jfile + do + rm -rf "${jfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools +function bin_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/bin >/dev/null || return + grep -v '^#' < "${del_bin_list}" | while IFS= read -r binfile + do + rm -rf "${binfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools and jars from lib dir +function lib_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/lib >/dev/null || return + grep -v '^#' < "${del_lib_list}" | while IFS= read -r libfile + do + rm -rf "${libfile}" + done + popd >/dev/null || return +} + +# Create a new target directory and copy over the source contents. +cd "${basedir}" || exit +mkdir -p "${target}" +echo "Copying ${src} to ${target}..." +cp -rf "${src}"/* "${target}"/ + +pushd "${target}" >/dev/null || exit + root=$(pwd) + echo "Trimming files..." + + # Remove examples documentation and sources. + rm -rf demo/ sample/ man/ + + # jre dir may not be present on all builds. + if [ -d "${target}"/jre ]; then + # Trim file in jre dir. + jre_files + + # Trim file in jre/lib dir. + jre_lib_files + + # Remove IBM zOS charset files. + # This needs extra code in sun/nio/cs/ext/ExtendedCharsets.class to + # ignore the charset files that are removed. Disabling for now until + # this gets added in the upstream openjdk project. + # charset_files + + # Trim unneeded rt.jar classes. + rt_jar_classes + fi + + # Strip all remaining jar files of debug info. + strip_jar + + # Strip object files of debug info. + strip_bin + + # Remove all debuginfo files + debuginfo_files + + # Remove all src.zip files + srczip_files + + # Remove unnecessary jmod files + jmod_files + + # Remove unnecessary tools and jars from lib dir + lib_files + + # Remove unnecessary tools + bin_files + + # Remove temp folders + rm -rf "${root}"/jre/lib/slim "${src}" +popd >/dev/null || exit + +mv "${target}" "${src}" +echo "Done" diff --git a/16/jdk/debianslim/slim-java_bin_del.list b/16/jdk/debianslim/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/debianslim/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/debianslim/slim-java_jmod_del.list b/16/jdk/debianslim/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/debianslim/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/debianslim/slim-java_lib_del.list b/16/jdk/debianslim/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/debianslim/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/debianslim/slim-java_rtjar_del.list b/16/jdk/debianslim/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/debianslim/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/debianslim/slim-java_rtjar_keep.list b/16/jdk/debianslim/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/debianslim/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/leap/Dockerfile.hotspot.nightly.full b/16/jdk/leap/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..633e56496 --- /dev/null +++ b/16/jdk/leap/Dockerfile.hotspot.nightly.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/leap/Dockerfile.hotspot.releases.full b/16/jdk/leap/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..22726ed5b --- /dev/null +++ b/16/jdk/leap/Dockerfile.hotspot.releases.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/leap/Dockerfile.openj9.nightly.full b/16/jdk/leap/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..8f8fcf080 --- /dev/null +++ b/16/jdk/leap/Dockerfile.openj9.nightly.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/leap/Dockerfile.openj9.releases.full b/16/jdk/leap/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..00c068c23 --- /dev/null +++ b/16/jdk/leap/Dockerfile.openj9.releases.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/tumbleweed/Dockerfile.hotspot.nightly.full b/16/jdk/tumbleweed/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..514ec4150 --- /dev/null +++ b/16/jdk/tumbleweed/Dockerfile.hotspot.nightly.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/tumbleweed/Dockerfile.hotspot.releases.full b/16/jdk/tumbleweed/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..bddbef706 --- /dev/null +++ b/16/jdk/tumbleweed/Dockerfile.hotspot.releases.full @@ -0,0 +1,66 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/tumbleweed/Dockerfile.openj9.nightly.full b/16/jdk/tumbleweed/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..e87753757 --- /dev/null +++ b/16/jdk/tumbleweed/Dockerfile.openj9.nightly.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/tumbleweed/Dockerfile.openj9.releases.full b/16/jdk/tumbleweed/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..266d1f0fa --- /dev/null +++ b/16/jdk/tumbleweed/Dockerfile.openj9.releases.full @@ -0,0 +1,113 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubi-minimal/Dockerfile.hotspot.nightly.full b/16/jdk/ubi-minimal/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..91bb074ee --- /dev/null +++ b/16/jdk/ubi-minimal/Dockerfile.hotspot.nightly.full @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubi-minimal/Dockerfile.hotspot.releases.full b/16/jdk/ubi-minimal/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..70b5d8e8b --- /dev/null +++ b/16/jdk/ubi-minimal/Dockerfile.hotspot.releases.full @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubi-minimal/Dockerfile.openj9.nightly.full b/16/jdk/ubi-minimal/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..2b32b6997 --- /dev/null +++ b/16/jdk/ubi-minimal/Dockerfile.openj9.nightly.full @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubi-minimal/Dockerfile.openj9.releases.full b/16/jdk/ubi-minimal/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..204940283 --- /dev/null +++ b/16/jdk/ubi-minimal/Dockerfile.openj9.releases.full @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36_openj9-0.25.0" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.hotspot.nightly.full b/16/jdk/ubi/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..4ec74718d --- /dev/null +++ b/16/jdk/ubi/Dockerfile.hotspot.nightly.full @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.hotspot.nightly.slim b/16/jdk/ubi/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..de9d92827 --- /dev/null +++ b/16/jdk/ubi/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.hotspot.releases.full b/16/jdk/ubi/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..846fc1cfe --- /dev/null +++ b/16/jdk/ubi/Dockerfile.hotspot.releases.full @@ -0,0 +1,74 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.hotspot.releases.slim b/16/jdk/ubi/Dockerfile.hotspot.releases.slim new file mode 100644 index 000000000..52c98b0ea --- /dev/null +++ b/16/jdk/ubi/Dockerfile.hotspot.releases.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.openj9.nightly.full b/16/jdk/ubi/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..950301b4c --- /dev/null +++ b/16/jdk/ubi/Dockerfile.openj9.nightly.full @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.openj9.nightly.slim b/16/jdk/ubi/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..91d9c351f --- /dev/null +++ b/16/jdk/ubi/Dockerfile.openj9.nightly.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.openj9.releases.full b/16/jdk/ubi/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..fab579b41 --- /dev/null +++ b/16/jdk/ubi/Dockerfile.openj9.releases.full @@ -0,0 +1,121 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36_openj9-0.25.0" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubi/Dockerfile.openj9.releases.slim b/16/jdk/ubi/Dockerfile.openj9.releases.slim new file mode 100644 index 000000000..ec75646d4 --- /dev/null +++ b/16/jdk/ubi/Dockerfile.openj9.releases.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36_openj9-0.25.0" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubi/slim-java.sh b/16/jdk/ubi/slim-java.sh new file mode 100755 index 000000000..2a6b612c4 --- /dev/null +++ b/16/jdk/ubi/slim-java.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash +# +# 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. +# +set -o pipefail + +# Parse arguments +argc=$# +if [ ${argc} != 1 ]; then + message=$(basename "$0") + echo " Usage: ${message} Full-JDK-path" + exit 1 +fi + +# Which major java version +function get_java_version() { + # Only version 8 has the 1.8.0 format, all others have x.y.z-nnn where x is the major version + jver_string="$(java -version 2>&1 | grep "^openjdk version" | awk '{ print $3 }')" + ver_string="$(echo "${jver_string}" | awk -F'.' '{ print $1 }' | awk -F'"' '{ print $2 }')" + case "${ver_string}" in + 1) + java_major_version="8"; + ;; + *) + java_major_version="${ver_string}"; + ;; + esac +} + +# Set the java major version that we are on right now. +get_java_version + +# Validate prerequisites(tools) necessary for making a slim build +if [ "${java_major_version}" -ge 14 ]; then + tools="jar jarsigner strip" +else + tools="jar jarsigner pack200 strip" +fi + +for tool in ${tools}; +do + command -v "${tool}" >/dev/null 2>&1 || { echo >&2 "${tool} not found, please add ${tool} into PATH"; exit 1; } +done + +# Set input of this script +src="$1" +# Store necessary directories paths +basedir=$(dirname "${src}") +scriptdir=$(dirname "$0") +target="${basedir}"/slim + +# Files for Keep and Del list of classes in rt.jar +keep_list="${scriptdir}/slim-java_rtjar_keep.list" +del_list="${scriptdir}/slim-java_rtjar_del.list" +# jmod files to be deleted +del_jmod_list="${scriptdir}/slim-java_jmod_del.list" +# bin files to be deleted +del_bin_list="${scriptdir}/slim-java_bin_del.list" +# lib files to be deleted +del_lib_list="${scriptdir}/slim-java_lib_del.list" + +# We only support 64 bit builds now +proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function parse_platform_specific() { + arch_info=$(uname -m) + + case "${arch_info}" in + aarch64) + echo "aarch64"; + ;; + ppc64el|ppc64le) + echo "ppc64le"; + ;; + s390x) + echo "s390x"; + ;; + amd64|x86_64) + echo "amd64"; + ;; + *) + echo "ERROR: Unknown platform"; + exit 1; + ;; + esac +} + +# Which vm implementation are we running on at the moment. +function get_vm_impl() { + impl="$(java -version 2>&1 | grep "OpenJ9")"; + if [ -n "${impl}" ]; then + echo "OpenJ9"; + else + echo "Hotspot"; + fi +} + +# Strip debug symbols from the given jar file. +function strip_debug_from_jar() { + jar=$1 + isSigned=$(jarsigner -verify "${jar}" | grep 'jar verified') + if [ "${isSigned}" == "" ]; then + echo " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}".new "${jar}" + mv "${jar}".new "${jar}" + fi +} + +# Trim the files in jre/lib dir +function jre_lib_files() { + echo -n "INFO: Trimming jre/lib dir..." + pushd "${target}"/jre/lib >/dev/null || return + rm -rf applet/ boot/ ddr/ deploy desktop/ endorsed/ + rm -rf images/icons/ locale/ oblique-fonts/ security/javaws.policy aggressive.jar deploy.jar javaws.jar jexec jlm.src.jar plugin.jar + pushd ext/ >/dev/null || return + rm -f dnsns.jar dtfj*.jar nashorn.jar traceformat.jar + popd >/dev/null || return + # Derive arch from current platorm. + lib_arch_dir=$(parse_platform_specific) + if [ -d "${lib_arch_dir}" ]; then + pushd "${lib_arch_dir}" >/dev/null || return + rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if [ "${proc_type}" == "64bit" ]; then + rm -rf default/ + fi + popd >/dev/null || return + fi + popd >/dev/null || return + echo "done" +} + +# Trim the files in the jre dir +function jre_files() { + echo -n "INFO: Trimming jre dir..." + pushd "${target}"/jre >/dev/null || return + rm -f ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README + rm -rf bin + ln -s ../bin bin + popd >/dev/null || return + echo "done" +} + +# Exclude the zOS specific charsets +function charset_files() { + + # 2.3 Special treat for removing ZOS specific charsets + echo -n "INFO: Trimming charsets..." + mkdir -p "${root}"/charsets_class + pushd "${root}"/charsets_class >/dev/null || return + jar -xf "${root}"/jre/lib/charsets.jar + ibmEbcdic="290 300 833 834 838 918 930 933 935 937 939 1025 1026 1046 1047 1097 1112 1122 1123 1364" + + # Generate sfj-excludes-charsets list as well. (OpenJ9 expects the file to be named sfj-excludes-charsets). + [ ! -e "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets ] || rm -rf "${root}"/jre/lib/sfj/sun/nio/cs/ext/sfj-excludes-charsets + exclude_charsets="" + + for charset in ${ibmEbcdic}; + do + rm -f sun/nio/cs/ext/IBM"${charset}".class + rm -f sun/nio/cs/ext/IBM"${charset}"\$*.class + + exclude_charsets="${exclude_charsets} IBM${charset}" + done + mkdir -p "${root}"/jre/lib/slim/sun/nio/cs/ext + echo "${exclude_charsets}" > "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets + cp "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets sun/nio/cs/ext/ + + jar -cfm "${root}"/jre/lib/charsets.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf "${root}"/charsets_class + echo "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function rt_jar_classes() { + # 2.4 Remove classes in rt.jar + echo -n "INFO: Trimming classes in rt.jar..." + mkdir -p "${root}"/rt_class + pushd "${root}"/rt_class >/dev/null || return + jar -xf "${root}"/jre/lib/rt.jar + mkdir -p "${root}"/rt_keep_class + grep -v '^#' < "${keep_list}" | while IFS= read -r class + do + cp --parents "${class}".class "${root}"/rt_keep_class/ >null 2>&1 + cp --parents "${class}"\$*.class "${root}"/rt_keep_class/ >null 2>&1 + done + + grep -v '^#' < "${del_list}" | while IFS= read -r class + do + rm -rf "${class}" + done + cp -rf "${root}"/rt_keep_class/* ./ + rm -rf "${root}"/rt_keep_class + + # 2.5. Restruct rt.jar + jar -cfm "${root}"/jre/lib/rt.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf rt_class + echo "done" +} + +# Strip the debug info from all jar files +function strip_jar() { + # pack200 is not available from Java 14 onwards + if [ "${java_major_version}" -ge 14 ]; then + return; + fi + # Using pack200 to strip debug info in jars + echo "INFO: Strip debug info from jar files" + list=$(find . -name "*.jar") + for jar in ${list}; + do + strip_debug_from_jar "${jar}" + done +} + +# Strip debug information from share libraries +function strip_bin() { + echo -n "INFO: Stripping debug info in object files..." + find bin -type f ! -path "./*"/java-rmi.cgi -exec strip -s {} \; + find . -name "*.so*" -exec strip -s {} \; + find . -name jexec -exec strip -s {} \; + echo "done" +} + +# Remove all debuginfo files +function debuginfo_files() { + echo -n "INFO: Removing all .debuginfo files..." + find . -name "*.debuginfo" -exec rm -f {} \; + echo "done" +} + +# Remove all src.zip files +function srczip_files() { + echo -n "INFO: Removing all src.zip files..." + find . -name "*src*zip" -exec rm -f {} \; + echo "done" +} + +# Remove unnecessary jmod files +function jmod_files() { + if [ ! -d "${target}"/jmods ]; then + return; + fi + pushd "${target}"/jmods >/dev/null || return + grep -v '^#' < "${del_jmod_list}" | while IFS= read -r jfile + do + rm -rf "${jfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools +function bin_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/bin >/dev/null || return + grep -v '^#' < "${del_bin_list}" | while IFS= read -r binfile + do + rm -rf "${binfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools and jars from lib dir +function lib_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/lib >/dev/null || return + grep -v '^#' < "${del_lib_list}" | while IFS= read -r libfile + do + rm -rf "${libfile}" + done + popd >/dev/null || return +} + +# Create a new target directory and copy over the source contents. +cd "${basedir}" || exit +mkdir -p "${target}" +echo "Copying ${src} to ${target}..." +cp -rf "${src}"/* "${target}"/ + +pushd "${target}" >/dev/null || exit + root=$(pwd) + echo "Trimming files..." + + # Remove examples documentation and sources. + rm -rf demo/ sample/ man/ + + # jre dir may not be present on all builds. + if [ -d "${target}"/jre ]; then + # Trim file in jre dir. + jre_files + + # Trim file in jre/lib dir. + jre_lib_files + + # Remove IBM zOS charset files. + # This needs extra code in sun/nio/cs/ext/ExtendedCharsets.class to + # ignore the charset files that are removed. Disabling for now until + # this gets added in the upstream openjdk project. + # charset_files + + # Trim unneeded rt.jar classes. + rt_jar_classes + fi + + # Strip all remaining jar files of debug info. + strip_jar + + # Strip object files of debug info. + strip_bin + + # Remove all debuginfo files + debuginfo_files + + # Remove all src.zip files + srczip_files + + # Remove unnecessary jmod files + jmod_files + + # Remove unnecessary tools and jars from lib dir + lib_files + + # Remove unnecessary tools + bin_files + + # Remove temp folders + rm -rf "${root}"/jre/lib/slim "${src}" +popd >/dev/null || exit + +mv "${target}" "${src}" +echo "Done" diff --git a/16/jdk/ubi/slim-java_bin_del.list b/16/jdk/ubi/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/ubi/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/ubi/slim-java_jmod_del.list b/16/jdk/ubi/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/ubi/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/ubi/slim-java_lib_del.list b/16/jdk/ubi/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/ubi/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/ubi/slim-java_rtjar_del.list b/16/jdk/ubi/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/ubi/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/ubi/slim-java_rtjar_keep.list b/16/jdk/ubi/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/ubi/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/ubuntu/Dockerfile.hotspot.nightly.full b/16/jdk/ubuntu/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..d769d7e5b --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.hotspot.nightly.full @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubuntu/Dockerfile.hotspot.nightly.slim b/16/jdk/ubuntu/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..e7ee66bc0 --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f5a4711ee850011bffbaf1d92419616723e484ddf72943921266aa01851ac70a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='6e67a04983efe9bdfd5c2e0c0a1b6536d6a88ac9f505e45b8192729e6950c649'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='897dfcd60b10551d8f0c6eb9694548985153e1cfe6f91bef7f136e591b53a298'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='03cbfefd942b6c004c118c00ade4381538f27ac4a8ce2582fac0f12cd1a581a6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='51edac43e156fc653373cc675e7d41c4598c1976d494f5fea2d2b9b9b13cf23c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubuntu/Dockerfile.hotspot.releases.full b/16/jdk/ubuntu/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..31e9543b7 --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.hotspot.releases.full @@ -0,0 +1,69 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubuntu/Dockerfile.hotspot.releases.slim b/16/jdk/ubuntu/Dockerfile.hotspot.releases.slim new file mode 100644 index 000000000..114d58476 --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.hotspot.releases.slim @@ -0,0 +1,76 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='7217a9f9be3b0c8dfc78538f95fd2deb493eb651152d975062920566492b2574'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='f1d32ba01a40c98889f31368c0e987d6bbda65a7c50b8c088623b48e3a90104a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='07438952a22007c308440072cf3835c1c075e7102670cc666a3c47c8648da35a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='df34376116433f0e46c5e4935d73a0827d37b34d029f592d3b9383c92b024952'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2e031cf37018161c9e59b45fa4b98ff2ce4ce9297b824c512989d579a70f8422'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +CMD ["jshell"] diff --git a/16/jdk/ubuntu/Dockerfile.openj9.nightly.full b/16/jdk/ubuntu/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..17384e863 --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.openj9.nightly.full @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubuntu/Dockerfile.openj9.nightly.slim b/16/jdk/ubuntu/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..d56ce8112 --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.openj9.nightly.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5124b8f8ad93e298032fcc8e194507d9805ef76e87102c226d1da64233274e59'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9f88c75ce39bba40774d098a734baddbb0758c993b5c848bce41bed2400495b6'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='85789ba54264342f70213955606c395e52f1a71a2ba1dbe16fcc5c44b9876d1d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='1114be555ce0f315ffccff80ff6a059611ab459cfa2eebf9abefefdadd61f3aa'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jdk_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubuntu/Dockerfile.openj9.releases.full b/16/jdk/ubuntu/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..517691ce3 --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.openj9.releases.full @@ -0,0 +1,116 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubuntu/Dockerfile.openj9.releases.slim b/16/jdk/ubuntu/Dockerfile.openj9.releases.slim new file mode 100644 index 000000000..07b7332db --- /dev/null +++ b/16/jdk/ubuntu/Dockerfile.openj9.releases.slim @@ -0,0 +1,123 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +COPY slim-java* /usr/local/bin/ + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='f4d4e0c0e9e0a4d0f14172878cee5e1a0ae73170058e1c183a452f8d97331ac0'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='3cefa209bf6eb6fb1aa03661b26692c26036337022691c10cd4972556e0a0e0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='0165e38f6e25f3e6a4ccbfed732b9bcb0f438027e182b368ad905620b97bb162'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='9f9b327d08cbc71b32f28004ae9d9c2c84ff9bc335cac3068c5a5737bfa4606f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + export PATH="/opt/java/openjdk/bin:$PATH"; \ + apt-get update; apt-get install -y --no-install-recommends binutils; \ + /usr/local/bin/slim-java.sh /opt/java/openjdk; \ + apt-get remove -y binutils; \ + rm -rf /var/lib/apt/lists/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + +CMD ["jshell"] diff --git a/16/jdk/ubuntu/slim-java.sh b/16/jdk/ubuntu/slim-java.sh new file mode 100755 index 000000000..2a6b612c4 --- /dev/null +++ b/16/jdk/ubuntu/slim-java.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash +# +# 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. +# +set -o pipefail + +# Parse arguments +argc=$# +if [ ${argc} != 1 ]; then + message=$(basename "$0") + echo " Usage: ${message} Full-JDK-path" + exit 1 +fi + +# Which major java version +function get_java_version() { + # Only version 8 has the 1.8.0 format, all others have x.y.z-nnn where x is the major version + jver_string="$(java -version 2>&1 | grep "^openjdk version" | awk '{ print $3 }')" + ver_string="$(echo "${jver_string}" | awk -F'.' '{ print $1 }' | awk -F'"' '{ print $2 }')" + case "${ver_string}" in + 1) + java_major_version="8"; + ;; + *) + java_major_version="${ver_string}"; + ;; + esac +} + +# Set the java major version that we are on right now. +get_java_version + +# Validate prerequisites(tools) necessary for making a slim build +if [ "${java_major_version}" -ge 14 ]; then + tools="jar jarsigner strip" +else + tools="jar jarsigner pack200 strip" +fi + +for tool in ${tools}; +do + command -v "${tool}" >/dev/null 2>&1 || { echo >&2 "${tool} not found, please add ${tool} into PATH"; exit 1; } +done + +# Set input of this script +src="$1" +# Store necessary directories paths +basedir=$(dirname "${src}") +scriptdir=$(dirname "$0") +target="${basedir}"/slim + +# Files for Keep and Del list of classes in rt.jar +keep_list="${scriptdir}/slim-java_rtjar_keep.list" +del_list="${scriptdir}/slim-java_rtjar_del.list" +# jmod files to be deleted +del_jmod_list="${scriptdir}/slim-java_jmod_del.list" +# bin files to be deleted +del_bin_list="${scriptdir}/slim-java_bin_del.list" +# lib files to be deleted +del_lib_list="${scriptdir}/slim-java_lib_del.list" + +# We only support 64 bit builds now +proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function parse_platform_specific() { + arch_info=$(uname -m) + + case "${arch_info}" in + aarch64) + echo "aarch64"; + ;; + ppc64el|ppc64le) + echo "ppc64le"; + ;; + s390x) + echo "s390x"; + ;; + amd64|x86_64) + echo "amd64"; + ;; + *) + echo "ERROR: Unknown platform"; + exit 1; + ;; + esac +} + +# Which vm implementation are we running on at the moment. +function get_vm_impl() { + impl="$(java -version 2>&1 | grep "OpenJ9")"; + if [ -n "${impl}" ]; then + echo "OpenJ9"; + else + echo "Hotspot"; + fi +} + +# Strip debug symbols from the given jar file. +function strip_debug_from_jar() { + jar=$1 + isSigned=$(jarsigner -verify "${jar}" | grep 'jar verified') + if [ "${isSigned}" == "" ]; then + echo " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}".new "${jar}" + mv "${jar}".new "${jar}" + fi +} + +# Trim the files in jre/lib dir +function jre_lib_files() { + echo -n "INFO: Trimming jre/lib dir..." + pushd "${target}"/jre/lib >/dev/null || return + rm -rf applet/ boot/ ddr/ deploy desktop/ endorsed/ + rm -rf images/icons/ locale/ oblique-fonts/ security/javaws.policy aggressive.jar deploy.jar javaws.jar jexec jlm.src.jar plugin.jar + pushd ext/ >/dev/null || return + rm -f dnsns.jar dtfj*.jar nashorn.jar traceformat.jar + popd >/dev/null || return + # Derive arch from current platorm. + lib_arch_dir=$(parse_platform_specific) + if [ -d "${lib_arch_dir}" ]; then + pushd "${lib_arch_dir}" >/dev/null || return + rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if [ "${proc_type}" == "64bit" ]; then + rm -rf default/ + fi + popd >/dev/null || return + fi + popd >/dev/null || return + echo "done" +} + +# Trim the files in the jre dir +function jre_files() { + echo -n "INFO: Trimming jre dir..." + pushd "${target}"/jre >/dev/null || return + rm -f ASSEMBLY_EXCEPTION LICENSE THIRD_PARTY_README + rm -rf bin + ln -s ../bin bin + popd >/dev/null || return + echo "done" +} + +# Exclude the zOS specific charsets +function charset_files() { + + # 2.3 Special treat for removing ZOS specific charsets + echo -n "INFO: Trimming charsets..." + mkdir -p "${root}"/charsets_class + pushd "${root}"/charsets_class >/dev/null || return + jar -xf "${root}"/jre/lib/charsets.jar + ibmEbcdic="290 300 833 834 838 918 930 933 935 937 939 1025 1026 1046 1047 1097 1112 1122 1123 1364" + + # Generate sfj-excludes-charsets list as well. (OpenJ9 expects the file to be named sfj-excludes-charsets). + [ ! -e "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets ] || rm -rf "${root}"/jre/lib/sfj/sun/nio/cs/ext/sfj-excludes-charsets + exclude_charsets="" + + for charset in ${ibmEbcdic}; + do + rm -f sun/nio/cs/ext/IBM"${charset}".class + rm -f sun/nio/cs/ext/IBM"${charset}"\$*.class + + exclude_charsets="${exclude_charsets} IBM${charset}" + done + mkdir -p "${root}"/jre/lib/slim/sun/nio/cs/ext + echo "${exclude_charsets}" > "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets + cp "${root}"/jre/lib/slim/sun/nio/cs/ext/sfj-excludes-charsets sun/nio/cs/ext/ + + jar -cfm "${root}"/jre/lib/charsets.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf "${root}"/charsets_class + echo "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function rt_jar_classes() { + # 2.4 Remove classes in rt.jar + echo -n "INFO: Trimming classes in rt.jar..." + mkdir -p "${root}"/rt_class + pushd "${root}"/rt_class >/dev/null || return + jar -xf "${root}"/jre/lib/rt.jar + mkdir -p "${root}"/rt_keep_class + grep -v '^#' < "${keep_list}" | while IFS= read -r class + do + cp --parents "${class}".class "${root}"/rt_keep_class/ >null 2>&1 + cp --parents "${class}"\$*.class "${root}"/rt_keep_class/ >null 2>&1 + done + + grep -v '^#' < "${del_list}" | while IFS= read -r class + do + rm -rf "${class}" + done + cp -rf "${root}"/rt_keep_class/* ./ + rm -rf "${root}"/rt_keep_class + + # 2.5. Restruct rt.jar + jar -cfm "${root}"/jre/lib/rt.jar META-INF/MANIFEST.MF ./* + popd >/dev/null || return + rm -rf rt_class + echo "done" +} + +# Strip the debug info from all jar files +function strip_jar() { + # pack200 is not available from Java 14 onwards + if [ "${java_major_version}" -ge 14 ]; then + return; + fi + # Using pack200 to strip debug info in jars + echo "INFO: Strip debug info from jar files" + list=$(find . -name "*.jar") + for jar in ${list}; + do + strip_debug_from_jar "${jar}" + done +} + +# Strip debug information from share libraries +function strip_bin() { + echo -n "INFO: Stripping debug info in object files..." + find bin -type f ! -path "./*"/java-rmi.cgi -exec strip -s {} \; + find . -name "*.so*" -exec strip -s {} \; + find . -name jexec -exec strip -s {} \; + echo "done" +} + +# Remove all debuginfo files +function debuginfo_files() { + echo -n "INFO: Removing all .debuginfo files..." + find . -name "*.debuginfo" -exec rm -f {} \; + echo "done" +} + +# Remove all src.zip files +function srczip_files() { + echo -n "INFO: Removing all src.zip files..." + find . -name "*src*zip" -exec rm -f {} \; + echo "done" +} + +# Remove unnecessary jmod files +function jmod_files() { + if [ ! -d "${target}"/jmods ]; then + return; + fi + pushd "${target}"/jmods >/dev/null || return + grep -v '^#' < "${del_jmod_list}" | while IFS= read -r jfile + do + rm -rf "${jfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools +function bin_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/bin >/dev/null || return + grep -v '^#' < "${del_bin_list}" | while IFS= read -r binfile + do + rm -rf "${binfile}" + done + popd >/dev/null || return +} + +# Remove unnecessary tools and jars from lib dir +function lib_files() { + echo -n "INFO: Trimming bin dir..." + pushd "${target}"/lib >/dev/null || return + grep -v '^#' < "${del_lib_list}" | while IFS= read -r libfile + do + rm -rf "${libfile}" + done + popd >/dev/null || return +} + +# Create a new target directory and copy over the source contents. +cd "${basedir}" || exit +mkdir -p "${target}" +echo "Copying ${src} to ${target}..." +cp -rf "${src}"/* "${target}"/ + +pushd "${target}" >/dev/null || exit + root=$(pwd) + echo "Trimming files..." + + # Remove examples documentation and sources. + rm -rf demo/ sample/ man/ + + # jre dir may not be present on all builds. + if [ -d "${target}"/jre ]; then + # Trim file in jre dir. + jre_files + + # Trim file in jre/lib dir. + jre_lib_files + + # Remove IBM zOS charset files. + # This needs extra code in sun/nio/cs/ext/ExtendedCharsets.class to + # ignore the charset files that are removed. Disabling for now until + # this gets added in the upstream openjdk project. + # charset_files + + # Trim unneeded rt.jar classes. + rt_jar_classes + fi + + # Strip all remaining jar files of debug info. + strip_jar + + # Strip object files of debug info. + strip_bin + + # Remove all debuginfo files + debuginfo_files + + # Remove all src.zip files + srczip_files + + # Remove unnecessary jmod files + jmod_files + + # Remove unnecessary tools and jars from lib dir + lib_files + + # Remove unnecessary tools + bin_files + + # Remove temp folders + rm -rf "${root}"/jre/lib/slim "${src}" +popd >/dev/null || exit + +mv "${target}" "${src}" +echo "Done" diff --git a/16/jdk/ubuntu/slim-java_bin_del.list b/16/jdk/ubuntu/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/ubuntu/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/ubuntu/slim-java_jmod_del.list b/16/jdk/ubuntu/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/ubuntu/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/ubuntu/slim-java_lib_del.list b/16/jdk/ubuntu/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/ubuntu/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/ubuntu/slim-java_rtjar_del.list b/16/jdk/ubuntu/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/ubuntu/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/ubuntu/slim-java_rtjar_keep.list b/16/jdk/ubuntu/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/ubuntu/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.nightly.full b/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..612e88f6c --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.nightly.full @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.nightly.slim b/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..786650941 --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.releases.full b/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..f84b310fb --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/Dockerfile.hotspot.releases.full @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk-16+36 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_windows_hotspot_16_36.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_windows_hotspot_16_36.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (e6cadfef528ad347bd23443d329501d18ac9f230485a426d40e1f7cfcb6a7ab0) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne 'e6cadfef528ad347bd23443d329501d18ac9f230485a426d40e1f7cfcb6a7ab0') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1809/Dockerfile.openj9.nightly.full b/16/jdk/windows/nanoserver-1809/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..89e7be54a --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/Dockerfile.openj9.nightly.full @@ -0,0 +1,51 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1809/Dockerfile.openj9.nightly.slim b/16/jdk/windows/nanoserver-1809/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..d54871966 --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/Dockerfile.openj9.nightly.slim @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1809/slim-java.ps1 b/16/jdk/windows/nanoserver-1809/slim-java.ps1 new file mode 100644 index 000000000..bdb207a49 --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/slim-java.ps1 @@ -0,0 +1,375 @@ +# +# 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. +# +[CmdletBinding()] +Param( + [Parameter(Position=0, Mandatory=$true)] + [String] + $Src +) + +$ErrorActionPreference = "Stop" + +$env:PATH = "$(Join-Path $Src 'bin');${env:PATH}" + +$pwd = Get-Location + +# Which major java version +function Get-JavaVersion() { + $verstring = (Get-Command java.exe | Select-Object -ExpandProperty Version).ToString() + + switch -wildcard ($verstring) { + "8.*" { return 8; break } + "9.*" { return 9; break } + "10*" { return 10; break } + "11*" { return 11; break } + "12*" { return 12; break } + "13*" { return 13; break } + "14*" { return 14; break } + default { + Write-Error "Unknown Java Version: $verstring" + exit 1 + } + } +} + +function Test-CommandExists($command) { + $oldPreference = $ErrorActionPreference + $ErrorActionPreference = 'stop' + $res = $false + try { + if(Get-Command $command) { + $res = $true + } + } catch { + $res = $false + } finally { + $ErrorActionPreference=$oldPreference + } + return $res +} + +# Set the java major version that we are on right now. +$java_major_version = Get-JavaVersion + +# Validate prerequisites(tools) necessary for making a slim build +$tools = @("jar", "jarsigner") +if($java_major_version -lt 14) { + $tools += "pack200" +} + +foreach($tool in $tools) { + if(-not (Test-CommandExists $tool)) { + Write-Error "${tool} not found, please add ${tool} into PATH" + exit 1 + } +} + +# Store necessary directories paths +$basedir=Split-Path -Parent $Src +$target=Join-Path $basedir "slim" + +# Files for Keep and Del list of classes in rt.jar +$keep_list=Join-Path $PSScriptRoot "slim-java_rtjar_keep.list" +$del_list=Join-Path $PSScriptRoot "slim-java_rtjar_del.list" +# jmod files to be deleted +$del_jmod_list=Join-Path $PSScriptRoot "slim-java_jmod_del.list" +# bin files to be deleted +$del_bin_list=Join-Path $PSScriptRoot "slim-java_bin_del.list" +# lib files to be deleted +$del_lib_list=Join-Path $PSScriptRoot "slim-java_lib_del.list" + +# We only support 64 bit builds now +$proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function Parse-PlatformSpecific() { + return "amd64" +} + +# Which vm implementation are we running on at the moment. +function Get-VMImplementation() { + $impl=& cmd /c "java -version 2>&1" + if($impl -match "OpenJ9") { + return "OpenJ9" + } + return "Hotspot" +} + +# Strip debug symbols from the given jar file. +function Strip-DebugFromJar([string] $jar) { + $isSigned=(jarsigner -verify "${jar}" | Out-String).Contains('jar verified') + if(!$isSigned) { + Write-Host " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}.new" "${jar}" + Move-Item -Path "${jar}.new" -Destination "${jar}" -Force + } +} + +# Trim the files in jre/lib dir +function Trim-JRELibFiles() { + Write-Host -NoNewline "INFO: Trimming jre/lib dir..." + $path = Join-Path $target "jre/lib" + if(Test-Path $path) { + Push-Location $path + try { + @("applet", "boot", "ddr", "deploy", "destkop", "endorsed", "images/icons", "locale", "oblique-fonts", "security/javaws.policy", "aggressive.jar", "deploy.jar", "javaws.jar", "jexec", "jlm.src.jar", "plugin.jar") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } + + Push-Location "ext" + try { + @("dnsns.jar", "dtfj*.jar", "nashorn.jar", "traceformat.jar") | ForEach-Object { + if($_ -match '\*') { + Remove-Item -Force -Recurse -Path .\* -Include $_ + } elseif(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } finally { + Pop-Location + } + + # Derive arch from current platorm. + $lib_arch_dir=Parse-PlatformSpecific + if(Test-Path $lib_arch_dir) { + Push-Location $lib_arch_dir + try { + #rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if($proc_type -eq "64bit" -and (Test-Path "default")) { + Remove-Item -Recurse -Force "default" + } + } finally { + Pop-Location + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the files in the jre dir +function Trim-JREFiles() { + Write-Host -NoNewline "INFO: Trimming jre dir..." + $path = Join-Path $target "jre" + if(Test-Path $path) { + Push-Location $path + try { + @("ASSEMBLY_EXCEPTION", "LICENSE", "THIRD_PARTY_README") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +# rm -rf bin +# ln -s ../bin bin + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function Trim-RTJarClasses() { + # 2.4 Remove classes in rt.jar + Write-Host -NoNewline "INFO: Trimming classes in rt.jar..." + $path = Join-Path $root "rt_class" + New-Item -ItemType Directory -Path $path -Force | Out-Null + Push-Location $path + try { + jar -xf (Join-Path $root "jre/lib/rt.jar") + New-Item -ItemType Directory -Path (Join-Path $root "rt_keep_class") -Force | Out-Null + if(Test-Path $keep_list) { + Get-Content $keep_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path "${_}.class") { + Copy-Item -Path "${_}.class" -Recurse -Destination (Join-Path $root "rt_keep_class") + } + } + } + + if(Test-Path $del_list) { + Get-Content $del_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } + Copy-Item -Recurse -Force -Path "$(Join-Path $root "rt_keep_class")/*" -Destination . + Remove-Item -Force -Recurse -Path (Join-Path $root "rt_keep_class") + + # 2.5. Restruct rt.jar + jar -cfm (Join-Path $root "jre\lib\rt.jar") META-INF/MANIFEST.MF ./* + } finally { + Pop-Location + } + if(Test-Path $path) { + Remove-Item -Force -Recurse $path + } + Write-Host "done" +} + +# Strip the debug info from all jar files +function Strip-Jar() { + # pack200 is not available from Java 14 onwards + if($java_major_version -ge 14) { + return + } + + # Using pack200 to strip debug info in jars + Write-Host "INFO: Strip debug info from jar files" + Get-ChildItem -Recurse -Include *.jar -Path .\* | ForEach-Object { + Strip-DebugFromJar $_ + } +} + +# Remove all debuginfo files +function Remove-DebugInfoFiles() { + Write-Host -NoNewline "INFO: Removing all .debuginfo files..." + Get-ChildItem -Path .\* -Include *.debuginfo -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove all src.zip files +function Remove-SrcZipFiles() { + Write-Host -NoNewline "INFO: Removing all src.zip files..." + Get-ChildItem -Path .\* -Include *src*zip -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove unnecessary jmod files +function Remove-JmodFiles() { + $path = Join-Path $target "jmods" + if(Test-Path $path) { + Push-Location $path + try { + if(Test-Path $del_jmod_list) { + Get-Content $del_jmod_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } + } finally { + Pop-Location + } + } +} + +# Remove unnecessary tools +function Remove-BinFiles() { + Write-Host -NoNewline "INFO: Trimming bin dir..." + $path = Join-Path $target "bin" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_bin_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Remove unnecessary tools and jars from lib dir +function Remove-LibFiles() { + Write-Host -NoNewline "INFO: Trimming lib dir..." + $path = Join-Path $target "lib" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_lib_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Create a new target directory and copy over the source contents. +Set-Location $basedir +New-Item -ItemType Directory $target -Force | Out-Null +Write-Host "Copying ${src} to ${target}..." +Copy-Item -Recurse -Force -Path $src\* -Destination $target + +Push-Location $target +try{ + $root=Get-Location + Write-Host "Trimming files..." + + # Remove examples documentation and sources. + @("demo", "sample", "man") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force -Path $_ + } + } + + # jre dir may not be present on all builds. + if(Test-Path (Join-Path $target "jre")) { + # Trim file in jre dir. + Trim-JREFiles + + # Trim file in jre/lib dir. + Trim-JRELibFiles + + # Trim unneeded rt.jar classes. + Trim-RTJarClasses + } + + # Strip all remaining jar files of debug info. + Strip-Jar + + # Remove all debuginfo files + Remove-DebugInfoFiles + + # Remove all src.zip files + Remove-SrcZipFiles + + # Remove unnecessary jmod files + Remove-JmodFiles + + # Remove unnecessary tools and jars from lib dir + Remove-LibFiles + + # Remove unnecessary tools + Remove-BinFiles + + # Remove temp folders + @((Join-Path $root "jre\lib\slim"), $src) | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +} finally { + Pop-Location +} + +Move-Item -Path $target -Destination $src -Force +Set-Location $pwd +Write-Host "Done" diff --git a/16/jdk/windows/nanoserver-1809/slim-java_bin_del.list b/16/jdk/windows/nanoserver-1809/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/windows/nanoserver-1809/slim-java_jmod_del.list b/16/jdk/windows/nanoserver-1809/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/windows/nanoserver-1809/slim-java_lib_del.list b/16/jdk/windows/nanoserver-1809/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/windows/nanoserver-1809/slim-java_rtjar_del.list b/16/jdk/windows/nanoserver-1809/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/windows/nanoserver-1809/slim-java_rtjar_keep.list b/16/jdk/windows/nanoserver-1809/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/windows/nanoserver-1809/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/windows/nanoserver-1909/Dockerfile.hotspot.nightly.full b/16/jdk/windows/nanoserver-1909/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..f68479632 --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/Dockerfile.hotspot.nightly.full @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1909/Dockerfile.hotspot.nightly.slim b/16/jdk/windows/nanoserver-1909/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..e1ee0fbe6 --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '6ebbe684c567d19c1c57ceba560ff33fb08a122d05fe899fcf7f1dd6e7d72c54') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1909/Dockerfile.openj9.nightly.full b/16/jdk/windows/nanoserver-1909/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..ec6748efb --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/Dockerfile.openj9.nightly.full @@ -0,0 +1,51 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1909/Dockerfile.openj9.nightly.slim b/16/jdk/windows/nanoserver-1909/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..fa31a9107 --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/Dockerfile.openj9.nightly.slim @@ -0,0 +1,54 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '1f5a4f0b81f0000992138069a2ee68f47c1d741f94111efee41c146f4d77253b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/nanoserver-1909/slim-java.ps1 b/16/jdk/windows/nanoserver-1909/slim-java.ps1 new file mode 100644 index 000000000..bdb207a49 --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/slim-java.ps1 @@ -0,0 +1,375 @@ +# +# 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. +# +[CmdletBinding()] +Param( + [Parameter(Position=0, Mandatory=$true)] + [String] + $Src +) + +$ErrorActionPreference = "Stop" + +$env:PATH = "$(Join-Path $Src 'bin');${env:PATH}" + +$pwd = Get-Location + +# Which major java version +function Get-JavaVersion() { + $verstring = (Get-Command java.exe | Select-Object -ExpandProperty Version).ToString() + + switch -wildcard ($verstring) { + "8.*" { return 8; break } + "9.*" { return 9; break } + "10*" { return 10; break } + "11*" { return 11; break } + "12*" { return 12; break } + "13*" { return 13; break } + "14*" { return 14; break } + default { + Write-Error "Unknown Java Version: $verstring" + exit 1 + } + } +} + +function Test-CommandExists($command) { + $oldPreference = $ErrorActionPreference + $ErrorActionPreference = 'stop' + $res = $false + try { + if(Get-Command $command) { + $res = $true + } + } catch { + $res = $false + } finally { + $ErrorActionPreference=$oldPreference + } + return $res +} + +# Set the java major version that we are on right now. +$java_major_version = Get-JavaVersion + +# Validate prerequisites(tools) necessary for making a slim build +$tools = @("jar", "jarsigner") +if($java_major_version -lt 14) { + $tools += "pack200" +} + +foreach($tool in $tools) { + if(-not (Test-CommandExists $tool)) { + Write-Error "${tool} not found, please add ${tool} into PATH" + exit 1 + } +} + +# Store necessary directories paths +$basedir=Split-Path -Parent $Src +$target=Join-Path $basedir "slim" + +# Files for Keep and Del list of classes in rt.jar +$keep_list=Join-Path $PSScriptRoot "slim-java_rtjar_keep.list" +$del_list=Join-Path $PSScriptRoot "slim-java_rtjar_del.list" +# jmod files to be deleted +$del_jmod_list=Join-Path $PSScriptRoot "slim-java_jmod_del.list" +# bin files to be deleted +$del_bin_list=Join-Path $PSScriptRoot "slim-java_bin_del.list" +# lib files to be deleted +$del_lib_list=Join-Path $PSScriptRoot "slim-java_lib_del.list" + +# We only support 64 bit builds now +$proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function Parse-PlatformSpecific() { + return "amd64" +} + +# Which vm implementation are we running on at the moment. +function Get-VMImplementation() { + $impl=& cmd /c "java -version 2>&1" + if($impl -match "OpenJ9") { + return "OpenJ9" + } + return "Hotspot" +} + +# Strip debug symbols from the given jar file. +function Strip-DebugFromJar([string] $jar) { + $isSigned=(jarsigner -verify "${jar}" | Out-String).Contains('jar verified') + if(!$isSigned) { + Write-Host " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}.new" "${jar}" + Move-Item -Path "${jar}.new" -Destination "${jar}" -Force + } +} + +# Trim the files in jre/lib dir +function Trim-JRELibFiles() { + Write-Host -NoNewline "INFO: Trimming jre/lib dir..." + $path = Join-Path $target "jre/lib" + if(Test-Path $path) { + Push-Location $path + try { + @("applet", "boot", "ddr", "deploy", "destkop", "endorsed", "images/icons", "locale", "oblique-fonts", "security/javaws.policy", "aggressive.jar", "deploy.jar", "javaws.jar", "jexec", "jlm.src.jar", "plugin.jar") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } + + Push-Location "ext" + try { + @("dnsns.jar", "dtfj*.jar", "nashorn.jar", "traceformat.jar") | ForEach-Object { + if($_ -match '\*') { + Remove-Item -Force -Recurse -Path .\* -Include $_ + } elseif(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } finally { + Pop-Location + } + + # Derive arch from current platorm. + $lib_arch_dir=Parse-PlatformSpecific + if(Test-Path $lib_arch_dir) { + Push-Location $lib_arch_dir + try { + #rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if($proc_type -eq "64bit" -and (Test-Path "default")) { + Remove-Item -Recurse -Force "default" + } + } finally { + Pop-Location + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the files in the jre dir +function Trim-JREFiles() { + Write-Host -NoNewline "INFO: Trimming jre dir..." + $path = Join-Path $target "jre" + if(Test-Path $path) { + Push-Location $path + try { + @("ASSEMBLY_EXCEPTION", "LICENSE", "THIRD_PARTY_README") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +# rm -rf bin +# ln -s ../bin bin + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function Trim-RTJarClasses() { + # 2.4 Remove classes in rt.jar + Write-Host -NoNewline "INFO: Trimming classes in rt.jar..." + $path = Join-Path $root "rt_class" + New-Item -ItemType Directory -Path $path -Force | Out-Null + Push-Location $path + try { + jar -xf (Join-Path $root "jre/lib/rt.jar") + New-Item -ItemType Directory -Path (Join-Path $root "rt_keep_class") -Force | Out-Null + if(Test-Path $keep_list) { + Get-Content $keep_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path "${_}.class") { + Copy-Item -Path "${_}.class" -Recurse -Destination (Join-Path $root "rt_keep_class") + } + } + } + + if(Test-Path $del_list) { + Get-Content $del_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } + Copy-Item -Recurse -Force -Path "$(Join-Path $root "rt_keep_class")/*" -Destination . + Remove-Item -Force -Recurse -Path (Join-Path $root "rt_keep_class") + + # 2.5. Restruct rt.jar + jar -cfm (Join-Path $root "jre\lib\rt.jar") META-INF/MANIFEST.MF ./* + } finally { + Pop-Location + } + if(Test-Path $path) { + Remove-Item -Force -Recurse $path + } + Write-Host "done" +} + +# Strip the debug info from all jar files +function Strip-Jar() { + # pack200 is not available from Java 14 onwards + if($java_major_version -ge 14) { + return + } + + # Using pack200 to strip debug info in jars + Write-Host "INFO: Strip debug info from jar files" + Get-ChildItem -Recurse -Include *.jar -Path .\* | ForEach-Object { + Strip-DebugFromJar $_ + } +} + +# Remove all debuginfo files +function Remove-DebugInfoFiles() { + Write-Host -NoNewline "INFO: Removing all .debuginfo files..." + Get-ChildItem -Path .\* -Include *.debuginfo -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove all src.zip files +function Remove-SrcZipFiles() { + Write-Host -NoNewline "INFO: Removing all src.zip files..." + Get-ChildItem -Path .\* -Include *src*zip -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove unnecessary jmod files +function Remove-JmodFiles() { + $path = Join-Path $target "jmods" + if(Test-Path $path) { + Push-Location $path + try { + if(Test-Path $del_jmod_list) { + Get-Content $del_jmod_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } + } finally { + Pop-Location + } + } +} + +# Remove unnecessary tools +function Remove-BinFiles() { + Write-Host -NoNewline "INFO: Trimming bin dir..." + $path = Join-Path $target "bin" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_bin_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Remove unnecessary tools and jars from lib dir +function Remove-LibFiles() { + Write-Host -NoNewline "INFO: Trimming lib dir..." + $path = Join-Path $target "lib" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_lib_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Create a new target directory and copy over the source contents. +Set-Location $basedir +New-Item -ItemType Directory $target -Force | Out-Null +Write-Host "Copying ${src} to ${target}..." +Copy-Item -Recurse -Force -Path $src\* -Destination $target + +Push-Location $target +try{ + $root=Get-Location + Write-Host "Trimming files..." + + # Remove examples documentation and sources. + @("demo", "sample", "man") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force -Path $_ + } + } + + # jre dir may not be present on all builds. + if(Test-Path (Join-Path $target "jre")) { + # Trim file in jre dir. + Trim-JREFiles + + # Trim file in jre/lib dir. + Trim-JRELibFiles + + # Trim unneeded rt.jar classes. + Trim-RTJarClasses + } + + # Strip all remaining jar files of debug info. + Strip-Jar + + # Remove all debuginfo files + Remove-DebugInfoFiles + + # Remove all src.zip files + Remove-SrcZipFiles + + # Remove unnecessary jmod files + Remove-JmodFiles + + # Remove unnecessary tools and jars from lib dir + Remove-LibFiles + + # Remove unnecessary tools + Remove-BinFiles + + # Remove temp folders + @((Join-Path $root "jre\lib\slim"), $src) | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +} finally { + Pop-Location +} + +Move-Item -Path $target -Destination $src -Force +Set-Location $pwd +Write-Host "Done" diff --git a/16/jdk/windows/nanoserver-1909/slim-java_bin_del.list b/16/jdk/windows/nanoserver-1909/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jdk/windows/nanoserver-1909/slim-java_jmod_del.list b/16/jdk/windows/nanoserver-1909/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jdk/windows/nanoserver-1909/slim-java_lib_del.list b/16/jdk/windows/nanoserver-1909/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jdk/windows/nanoserver-1909/slim-java_rtjar_del.list b/16/jdk/windows/nanoserver-1909/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jdk/windows/nanoserver-1909/slim-java_rtjar_keep.list b/16/jdk/windows/nanoserver-1909/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jdk/windows/nanoserver-1909/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jdk/windows/windowsservercore-1809/Dockerfile.hotspot.nightly.full b/16/jdk/windows/windowsservercore-1809/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..ce8bc70b8 --- /dev/null +++ b/16/jdk/windows/windowsservercore-1809/Dockerfile.hotspot.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-1809/Dockerfile.hotspot.releases.full b/16/jdk/windows/windowsservercore-1809/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..310a3a56a --- /dev/null +++ b/16/jdk/windows/windowsservercore-1809/Dockerfile.hotspot.releases.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk-16+36 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_windows_hotspot_16_36.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_windows_hotspot_16_36.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (7e10ec7e61baad6293c8b2812eee7d049450602c9493f658f5476c48f0c450b1) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '7e10ec7e61baad6293c8b2812eee7d049450602c9493f658f5476c48f0c450b1') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-1809/Dockerfile.openj9.nightly.full b/16/jdk/windows/windowsservercore-1809/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..48a8d6516 --- /dev/null +++ b/16/jdk/windows/windowsservercore-1809/Dockerfile.openj9.nightly.full @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-1809/Dockerfile.openj9.releases.full b/16/jdk/windows/windowsservercore-1809/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..79dc1d2da --- /dev/null +++ b/16/jdk/windows/windowsservercore-1809/Dockerfile.openj9.releases.full @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk-16+36_openj9-0.25.0 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_windows_openj9_16_36_openj9-0.25.0.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_windows_openj9_16_36_openj9-0.25.0.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (5d5a2dd21567b376185076c4fcba42caf9e5c35565bbc2c416140514c8622460) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '5d5a2dd21567b376185076c4fcba42caf9e5c35565bbc2c416140514c8622460') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-1909/Dockerfile.hotspot.nightly.full b/16/jdk/windows/windowsservercore-1909/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..623a9fe77 --- /dev/null +++ b/16/jdk/windows/windowsservercore-1909/Dockerfile.hotspot.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-1909/Dockerfile.openj9.nightly.full b/16/jdk/windows/windowsservercore-1909/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..215422be4 --- /dev/null +++ b/16/jdk/windows/windowsservercore-1909/Dockerfile.openj9.nightly.full @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.nightly.full b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..840a0df3a --- /dev/null +++ b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.releases.full b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..00a0513d2 --- /dev/null +++ b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.releases.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk-16+36 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_windows_hotspot_16_36.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jdk_x64_windows_hotspot_16_36.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (7e10ec7e61baad6293c8b2812eee7d049450602c9493f658f5476c48f0c450b1) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '7e10ec7e61baad6293c8b2812eee7d049450602c9493f658f5476c48f0c450b1') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.openj9.nightly.full b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..d9e2da816 --- /dev/null +++ b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.openj9.nightly.full @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.openj9.releases.full b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..1b95e801f --- /dev/null +++ b/16/jdk/windows/windowsservercore-ltsc2016/Dockerfile.openj9.releases.full @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_windows_openj9_16_36_openj9-0.25.0.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jdk_x64_windows_openj9_16_36_openj9-0.25.0.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (5d5a2dd21567b376185076c4fcba42caf9e5c35565bbc2c416140514c8622460) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '5d5a2dd21567b376185076c4fcba42caf9e5c35565bbc2c416140514c8622460') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-ltsc2019/Dockerfile.hotspot.nightly.full b/16/jdk/windows/windowsservercore-ltsc2019/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..1c2eb2547 --- /dev/null +++ b/16/jdk/windows/windowsservercore-ltsc2019/Dockerfile.hotspot.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2019 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'fb3a076e0cfaa702d609eeaca17bd469c39951886355c01a775ed2fb38ad7d4b') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +CMD ["jshell"] diff --git a/16/jdk/windows/windowsservercore-ltsc2019/Dockerfile.openj9.nightly.full b/16/jdk/windows/windowsservercore-ltsc2019/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..7730ff36d --- /dev/null +++ b/16/jdk/windows/windowsservercore-ltsc2019/Dockerfile.openj9.nightly.full @@ -0,0 +1,45 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2019 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jdk_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '8342d76be0b597bb6506e283f81d6a226c58b84665b1169d501d59e6d24b0784') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" +CMD ["jshell"] diff --git a/16/jre/alpine/Dockerfile.hotspot.nightly.full b/16/jre/alpine/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..064a2519c --- /dev/null +++ b/16/jre/alpine/Dockerfile.hotspot.nightly.full @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/alpine/Dockerfile.hotspot.releases.full b/16/jre/alpine/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..76dc806e7 --- /dev/null +++ b/16/jre/alpine/Dockerfile.hotspot.releases.full @@ -0,0 +1,98 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/alpine/Dockerfile.openj9.nightly.full b/16/jre/alpine/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..ef59d2de0 --- /dev/null +++ b/16/jre/alpine/Dockerfile.openj9.nightly.full @@ -0,0 +1,148 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + apk add --no-cache --virtual .scc-deps curl; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + apk del --purge .scc-deps; \ + rm -rf /var/cache/apk/*; \ + echo "SCC generation phase completed"; + diff --git a/16/jre/alpine/Dockerfile.openj9.releases.full b/16/jre/alpine/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..833f2c72a --- /dev/null +++ b/16/jre/alpine/Dockerfile.openj9.releases.full @@ -0,0 +1,148 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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.12 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \ + && GLIBC_VER="2.31-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256="f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c" \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-3-x86_64.pkg.tar.xz" \ + && ZLIB_SHA256=17aede0b9f8baa789c5aa3f358fbf8c68a5f1228c5e6cba1a5dd34102ef4d4e5 \ + && curl -LfsS https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && SGERRAND_RSA_SHA256="823b54589c93b02497f1ba4dc622eaef9c813e6b0f0ebbb2f771e32adf9f4ef2" \ + && echo "${SGERRAND_RSA_SHA256} */etc/apk/keys/sgerrand.rsa.pub" | sha256sum -c - \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/glibc-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-${GLIBC_VER}.apk \ + && curl -LfsS ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-bin-${GLIBC_VER}.apk > /tmp/glibc-bin-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-bin-${GLIBC_VER}.apk \ + && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-i18n-${GLIBC_VER}.apk > /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && apk add --no-cache /tmp/glibc-i18n-${GLIBC_VER}.apk \ + && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 "$LANG" || true \ + && echo "export LANG=$LANG" > /etc/profile.d/locale.sh \ + && curl -LfsS ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} */tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst --output-dir-flat /tmp \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -LfsS ${ZLIB_URL} -o /tmp/libz.tar.xz \ + && echo "${ZLIB_SHA256} */tmp/libz.tar.xz" | sha256sum -c - \ + && mkdir /tmp/libz \ + && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps glibc-i18n \ + && rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/* + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + apk del --purge .fetch-deps; \ + rm -rf /var/cache/apk/*; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + apk add --no-cache --virtual .scc-deps curl; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + apk del --purge .scc-deps; \ + rm -rf /var/cache/apk/*; \ + echo "SCC generation phase completed"; + diff --git a/16/jre/centos/Dockerfile.hotspot.nightly.full b/16/jre/centos/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..31dc70761 --- /dev/null +++ b/16/jre/centos/Dockerfile.hotspot.nightly.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/centos/Dockerfile.hotspot.releases.full b/16/jre/centos/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..19fa6972a --- /dev/null +++ b/16/jre/centos/Dockerfile.hotspot.releases.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/centos/Dockerfile.openj9.nightly.full b/16/jre/centos/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..d1cd6081c --- /dev/null +++ b/16/jre/centos/Dockerfile.openj9.nightly.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/centos/Dockerfile.openj9.releases.full b/16/jre/centos/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..fa0099633 --- /dev/null +++ b/16/jre/centos/Dockerfile.openj9.releases.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 centos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/clefos/Dockerfile.hotspot.nightly.full b/16/jre/clefos/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..63d5e49e6 --- /dev/null +++ b/16/jre/clefos/Dockerfile.hotspot.nightly.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/clefos/Dockerfile.hotspot.releases.full b/16/jre/clefos/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..a89ad83ab --- /dev/null +++ b/16/jre/clefos/Dockerfile.hotspot.releases.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/clefos/Dockerfile.openj9.nightly.full b/16/jre/clefos/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..cf0ee64ac --- /dev/null +++ b/16/jre/clefos/Dockerfile.openj9.nightly.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/clefos/Dockerfile.openj9.releases.full b/16/jre/clefos/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..5174aaec5 --- /dev/null +++ b/16/jre/clefos/Dockerfile.openj9.releases.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 clefos:7 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ + && yum update -y; yum clean all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/debian/Dockerfile.hotspot.nightly.full b/16/jre/debian/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..1f4915f07 --- /dev/null +++ b/16/jre/debian/Dockerfile.hotspot.nightly.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/debian/Dockerfile.hotspot.releases.full b/16/jre/debian/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..0dcf857ab --- /dev/null +++ b/16/jre/debian/Dockerfile.hotspot.releases.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/debian/Dockerfile.openj9.nightly.full b/16/jre/debian/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..a18cb0b23 --- /dev/null +++ b/16/jre/debian/Dockerfile.openj9.nightly.full @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/debian/Dockerfile.openj9.releases.full b/16/jre/debian/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..4c1ee1a8c --- /dev/null +++ b/16/jre/debian/Dockerfile.openj9.releases.full @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/debianslim/Dockerfile.hotspot.nightly.full b/16/jre/debianslim/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..6c568bd6c --- /dev/null +++ b/16/jre/debianslim/Dockerfile.hotspot.nightly.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/debianslim/Dockerfile.hotspot.releases.full b/16/jre/debianslim/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..59608b8f8 --- /dev/null +++ b/16/jre/debianslim/Dockerfile.hotspot.releases.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/debianslim/Dockerfile.openj9.nightly.full b/16/jre/debianslim/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..4685feea7 --- /dev/null +++ b/16/jre/debianslim/Dockerfile.openj9.nightly.full @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/debianslim/Dockerfile.openj9.releases.full b/16/jre/debianslim/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..feb82f84a --- /dev/null +++ b/16/jre/debianslim/Dockerfile.openj9.releases.full @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 debian:buster-slim + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/leap/Dockerfile.hotspot.nightly.full b/16/jre/leap/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..9a58a9d5a --- /dev/null +++ b/16/jre/leap/Dockerfile.hotspot.nightly.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/leap/Dockerfile.hotspot.releases.full b/16/jre/leap/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..ac7b2718a --- /dev/null +++ b/16/jre/leap/Dockerfile.hotspot.releases.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/leap/Dockerfile.openj9.nightly.full b/16/jre/leap/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..d4f170add --- /dev/null +++ b/16/jre/leap/Dockerfile.openj9.nightly.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/leap/Dockerfile.openj9.releases.full b/16/jre/leap/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..c3d0853d7 --- /dev/null +++ b/16/jre/leap/Dockerfile.openj9.releases.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/leap:15.2 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/tumbleweed/Dockerfile.hotspot.nightly.full b/16/jre/tumbleweed/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..10c3b37a4 --- /dev/null +++ b/16/jre/tumbleweed/Dockerfile.hotspot.nightly.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/tumbleweed/Dockerfile.hotspot.releases.full b/16/jre/tumbleweed/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..94d07df2e --- /dev/null +++ b/16/jre/tumbleweed/Dockerfile.hotspot.releases.full @@ -0,0 +1,65 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/tumbleweed/Dockerfile.openj9.nightly.full b/16/jre/tumbleweed/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..533aad813 --- /dev/null +++ b/16/jre/tumbleweed/Dockerfile.openj9.nightly.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/tumbleweed/Dockerfile.openj9.releases.full b/16/jre/tumbleweed/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..9927b964b --- /dev/null +++ b/16/jre/tumbleweed/Dockerfile.openj9.releases.full @@ -0,0 +1,112 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 opensuse/tumbleweed:latest + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN zypper install --no-recommends -y timezone openssl curl ca-certificates fontconfig gzip tar \ + && zypper update -y; zypper clean --all + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/ubi-minimal/Dockerfile.hotspot.nightly.full b/16/jre/ubi-minimal/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..ce608acb7 --- /dev/null +++ b/16/jre/ubi-minimal/Dockerfile.hotspot.nightly.full @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/ubi-minimal/Dockerfile.hotspot.releases.full b/16/jre/ubi-minimal/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..c30689ec2 --- /dev/null +++ b/16/jre/ubi-minimal/Dockerfile.hotspot.releases.full @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/ubi-minimal/Dockerfile.openj9.nightly.full b/16/jre/ubi-minimal/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..5c7f7c29f --- /dev/null +++ b/16/jre/ubi-minimal/Dockerfile.openj9.nightly.full @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/ubi-minimal/Dockerfile.openj9.releases.full b/16/jre/ubi-minimal/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..84d9e3310 --- /dev/null +++ b/16/jre/ubi-minimal/Dockerfile.openj9.releases.full @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi-minimal:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && microdnf update -y; microdnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36_openj9-0.25.0" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi-minimal" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/ubi/Dockerfile.hotspot.nightly.full b/16/jre/ubi/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..af0c56f2a --- /dev/null +++ b/16/jre/ubi/Dockerfile.hotspot.nightly.full @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/ubi/Dockerfile.hotspot.releases.full b/16/jre/ubi/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..18f2ca885 --- /dev/null +++ b/16/jre/ubi/Dockerfile.hotspot.releases.full @@ -0,0 +1,73 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with hotspot and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/ubi/Dockerfile.openj9.nightly.full b/16/jre/ubi/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..79c4375bc --- /dev/null +++ b/16/jre/ubi/Dockerfile.openj9.nightly.full @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk16" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk16 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/ubi/Dockerfile.openj9.releases.full b/16/jre/ubi/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..ce669a913 --- /dev/null +++ b/16/jre/ubi/Dockerfile.openj9.releases.full @@ -0,0 +1,120 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 registry.access.redhat.com/ubi8/ubi:8.3 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \ + && dnf update -y; dnf clean all + +LABEL name="AdoptOpenJDK Java" \ + vendor="AdoptOpenJDK" \ + version="jdk-16+36_openj9-0.25.0" \ + release="16" \ + run="docker run --rm -ti /bin/bash" \ + summary="AdoptOpenJDK Docker Image for OpenJDK with openj9 and ubi" \ + description="For more information on this image please see https://github.com/AdoptOpenJDK/openjdk-docker/blob/master/README.md" + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(uname -m)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/ubuntu/Dockerfile.hotspot.nightly.full b/16/jre/ubuntu/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..25b321103 --- /dev/null +++ b/16/jre/ubuntu/Dockerfile.hotspot.nightly.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='59bf53f743387fb81471566143ac71faacd3fc8f95acc95bca47a902afa89f8d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='a8125223bd1135f4c2787c922d062678f6afba2490331052bfc877409c54e756'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_arm_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='9c35eed8af3570e0e6c2f1f025c8c8cf7a8d4163e405a02c9c115df4431c2511'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='781a5796937e9978a9b5e6fd4aeff3ac78a9675d4ff98912ea0ed7588ec24b7e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='2629e1131ce5d2fcc08641804e0d6ee4a853ac875fc64ab4190ef34193347b2c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_hotspot_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/ubuntu/Dockerfile.hotspot.releases.full b/16/jre/ubuntu/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..61b0607a7 --- /dev/null +++ b/16/jre/ubuntu/Dockerfile.hotspot.releases.full @@ -0,0 +1,68 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='947b02342513b085946b2e7c376cc1f1cfe89600bc3d30455160f88d41da3509'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_aarch64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='4d3f351a161792779417ee2730413a976258c4cc5f323526f1fbc0cca82aca6e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_arm_linux_hotspot_16_36.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='1e5b54ad65a072d924273cade535b1e5da823cebf72b3645a34c32fb141a2401'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_ppc64le_linux_hotspot_16_36.tar.gz'; \ + ;; \ + s390x) \ + ESUM='2033fee36e83c7f9d37455b29c5f49c5ed0ece7c5b05d52bab8e3cdb3e524a77'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_s390x_linux_hotspot_16_36.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='4aa99cbe5a6838c3ed29fa7aa7bee95c39ddd41e3f7544178dcd257b15a9359e'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_linux_hotspot_16_36.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" diff --git a/16/jre/ubuntu/Dockerfile.openj9.nightly.full b/16/jre/ubuntu/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..bd25d6392 --- /dev/null +++ b/16/jre/ubuntu/Dockerfile.openj9.nightly.full @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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 jdk16 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='5f2c4c69c9148bbcf2ac5ce9e5ace95e46d7fbd58d2b34bc1e22d69ce195e47d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_aarch64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='c04ef15b2bd29030ee49653eb66261557fcd33172b9b1f4396561aef2bc01767'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_ppc64le_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + s390x) \ + ESUM='86e72915c8d54919d7e786af1474c8c69caa80c4eb283004c23b4956daa61a7f'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_s390x_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='97e22da5ce79b8523d77e0a786a415b68d4f889a70a98d72f2e7ab1262dc3210'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-16-01-39/OpenJDK16-jre_x64_linux_openj9_2021-03-16-01-39.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/ubuntu/Dockerfile.openj9.releases.full b/16/jre/ubuntu/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..e08e15e1a --- /dev/null +++ b/16/jre/ubuntu/Dockerfile.openj9.releases.full @@ -0,0 +1,115 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:20.04 + +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +RUN apt-get update \ + && apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales \ + && 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-16+36_openj9-0.25.0 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='13ae42f5040d4e5d97b8809e27ebfdf8f7326604771963d85b2c1385abe13742'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_aarch64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='0e80def3cc03b984b3407a3bda841569a9df074cc73640881ffd10b28290fde5'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_ppc64le_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + s390x) \ + ESUM='bb2631805a301ee61ac868b118d280d27be1063da2dedd4fae446d317e3ede7a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_s390x_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + amd64|x86_64) \ + ESUM='302b8b9bba4f51d0a9ac087ed91929dbd3ae52cf5a5b6c150373563012db60d9'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_linux_openj9_16_36_openj9-0.25.0.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + cd /opt/java/openjdk; \ + tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal" + +# Create OpenJ9 SharedClassCache (SCC) for bootclasses to improve the java startup. +# Downloads and runs tomcat to generate SCC for bootclasses at /opt/java/.scc/openj9_system_scc +# Does a dry-run and calculates the optimal cache size and recreates the cache with the appropriate size. +# With SCC, OpenJ9 startup is improved ~50% with an increase in image size of ~14MB +# Application classes can be create a separate cache layer with this as the base for further startup improvement + +RUN set -eux; \ + unset OPENJ9_JAVA_OPTIONS; \ + SCC_SIZE="50m"; \ + DOWNLOAD_PATH_TOMCAT=/tmp/tomcat; \ + INSTALL_PATH_TOMCAT=/opt/tomcat-home; \ + TOMCAT_CHECKSUM="0db27185d9fc3174f2c670f814df3dda8a008b89d1a38a5d96cbbe119767ebfb1cf0bce956b27954aee9be19c4a7b91f2579d967932207976322033a86075f98"; \ + TOMCAT_DWNLD_URL="https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.35/bin/apache-tomcat-9.0.35.tar.gz"; \ + \ + mkdir -p "${DOWNLOAD_PATH_TOMCAT}" "${INSTALL_PATH_TOMCAT}"; \ + curl -LfsSo "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz "${TOMCAT_DWNLD_URL}"; \ + echo "${TOMCAT_CHECKSUM} *${DOWNLOAD_PATH_TOMCAT}/tomcat.tar.gz" | sha512sum -c -; \ + tar -xf "${DOWNLOAD_PATH_TOMCAT}"/tomcat.tar.gz -C "${INSTALL_PATH_TOMCAT}" --strip-components=1; \ + rm -rf "${DOWNLOAD_PATH_TOMCAT}"; \ + \ + java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 15; \ + FULL=$( (java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + DST_CACHE=$(java -Xshareclasses:name=dry_run_scc,cacheDir=/opt/java/.scc,destroy 2>&1 || true); \ + SCC_SIZE=$(echo $SCC_SIZE | sed 's/.$//'); \ + SCC_SIZE=$(awk "BEGIN {print int($SCC_SIZE * $FULL / 100.0)}"); \ + [ "${SCC_SIZE}" -eq 0 ] && SCC_SIZE=1; \ + SCC_SIZE="${SCC_SIZE}m"; \ + java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \ + unset OPENJ9_JAVA_OPTIONS; \ + \ + export OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,bootClassesOnly,nonFatal"; \ + "${INSTALL_PATH_TOMCAT}"/bin/startup.sh; \ + sleep 5; \ + "${INSTALL_PATH_TOMCAT}"/bin/shutdown.sh -force; \ + sleep 5; \ + FULL=$( (java -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,printallStats 2>&1 || true) | awk '/^Cache is [0-9.]*% .*full/ {print substr($3, 1, length($3)-1)}'); \ + echo "SCC layer is $FULL% full."; \ + rm -rf "${INSTALL_PATH_TOMCAT}"; \ + if [ -d "/opt/java/.scc" ]; then \ + chmod -R 0777 /opt/java/.scc; \ + fi; \ + \ + echo "SCC generation phase completed"; + diff --git a/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.nightly.full b/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..c07660282 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.nightly.full @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne 'b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" diff --git a/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.nightly.slim b/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..b56b71796 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne 'b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" diff --git a/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.releases.full b/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..5e794e099 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/Dockerfile.hotspot.releases.full @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk-16+36 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_windows_hotspot_16_36.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_windows_hotspot_16_36.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (0769aa0d23de037372b79cb6c208afabc098fede4e41d0a1b45aca81f789f1c5) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '0769aa0d23de037372b79cb6c208afabc098fede4e41d0a1b45aca81f789f1c5') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" diff --git a/16/jre/windows/nanoserver-1809/Dockerfile.openj9.nightly.full b/16/jre/windows/nanoserver-1809/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..b31112da4 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/Dockerfile.openj9.nightly.full @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/nanoserver-1809/Dockerfile.openj9.nightly.slim b/16/jre/windows/nanoserver-1809/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..ada026849 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/Dockerfile.openj9.nightly.slim @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/nanoserver-1809/slim-java.ps1 b/16/jre/windows/nanoserver-1809/slim-java.ps1 new file mode 100644 index 000000000..bdb207a49 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/slim-java.ps1 @@ -0,0 +1,375 @@ +# +# 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. +# +[CmdletBinding()] +Param( + [Parameter(Position=0, Mandatory=$true)] + [String] + $Src +) + +$ErrorActionPreference = "Stop" + +$env:PATH = "$(Join-Path $Src 'bin');${env:PATH}" + +$pwd = Get-Location + +# Which major java version +function Get-JavaVersion() { + $verstring = (Get-Command java.exe | Select-Object -ExpandProperty Version).ToString() + + switch -wildcard ($verstring) { + "8.*" { return 8; break } + "9.*" { return 9; break } + "10*" { return 10; break } + "11*" { return 11; break } + "12*" { return 12; break } + "13*" { return 13; break } + "14*" { return 14; break } + default { + Write-Error "Unknown Java Version: $verstring" + exit 1 + } + } +} + +function Test-CommandExists($command) { + $oldPreference = $ErrorActionPreference + $ErrorActionPreference = 'stop' + $res = $false + try { + if(Get-Command $command) { + $res = $true + } + } catch { + $res = $false + } finally { + $ErrorActionPreference=$oldPreference + } + return $res +} + +# Set the java major version that we are on right now. +$java_major_version = Get-JavaVersion + +# Validate prerequisites(tools) necessary for making a slim build +$tools = @("jar", "jarsigner") +if($java_major_version -lt 14) { + $tools += "pack200" +} + +foreach($tool in $tools) { + if(-not (Test-CommandExists $tool)) { + Write-Error "${tool} not found, please add ${tool} into PATH" + exit 1 + } +} + +# Store necessary directories paths +$basedir=Split-Path -Parent $Src +$target=Join-Path $basedir "slim" + +# Files for Keep and Del list of classes in rt.jar +$keep_list=Join-Path $PSScriptRoot "slim-java_rtjar_keep.list" +$del_list=Join-Path $PSScriptRoot "slim-java_rtjar_del.list" +# jmod files to be deleted +$del_jmod_list=Join-Path $PSScriptRoot "slim-java_jmod_del.list" +# bin files to be deleted +$del_bin_list=Join-Path $PSScriptRoot "slim-java_bin_del.list" +# lib files to be deleted +$del_lib_list=Join-Path $PSScriptRoot "slim-java_lib_del.list" + +# We only support 64 bit builds now +$proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function Parse-PlatformSpecific() { + return "amd64" +} + +# Which vm implementation are we running on at the moment. +function Get-VMImplementation() { + $impl=& cmd /c "java -version 2>&1" + if($impl -match "OpenJ9") { + return "OpenJ9" + } + return "Hotspot" +} + +# Strip debug symbols from the given jar file. +function Strip-DebugFromJar([string] $jar) { + $isSigned=(jarsigner -verify "${jar}" | Out-String).Contains('jar verified') + if(!$isSigned) { + Write-Host " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}.new" "${jar}" + Move-Item -Path "${jar}.new" -Destination "${jar}" -Force + } +} + +# Trim the files in jre/lib dir +function Trim-JRELibFiles() { + Write-Host -NoNewline "INFO: Trimming jre/lib dir..." + $path = Join-Path $target "jre/lib" + if(Test-Path $path) { + Push-Location $path + try { + @("applet", "boot", "ddr", "deploy", "destkop", "endorsed", "images/icons", "locale", "oblique-fonts", "security/javaws.policy", "aggressive.jar", "deploy.jar", "javaws.jar", "jexec", "jlm.src.jar", "plugin.jar") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } + + Push-Location "ext" + try { + @("dnsns.jar", "dtfj*.jar", "nashorn.jar", "traceformat.jar") | ForEach-Object { + if($_ -match '\*') { + Remove-Item -Force -Recurse -Path .\* -Include $_ + } elseif(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } finally { + Pop-Location + } + + # Derive arch from current platorm. + $lib_arch_dir=Parse-PlatformSpecific + if(Test-Path $lib_arch_dir) { + Push-Location $lib_arch_dir + try { + #rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if($proc_type -eq "64bit" -and (Test-Path "default")) { + Remove-Item -Recurse -Force "default" + } + } finally { + Pop-Location + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the files in the jre dir +function Trim-JREFiles() { + Write-Host -NoNewline "INFO: Trimming jre dir..." + $path = Join-Path $target "jre" + if(Test-Path $path) { + Push-Location $path + try { + @("ASSEMBLY_EXCEPTION", "LICENSE", "THIRD_PARTY_README") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +# rm -rf bin +# ln -s ../bin bin + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function Trim-RTJarClasses() { + # 2.4 Remove classes in rt.jar + Write-Host -NoNewline "INFO: Trimming classes in rt.jar..." + $path = Join-Path $root "rt_class" + New-Item -ItemType Directory -Path $path -Force | Out-Null + Push-Location $path + try { + jar -xf (Join-Path $root "jre/lib/rt.jar") + New-Item -ItemType Directory -Path (Join-Path $root "rt_keep_class") -Force | Out-Null + if(Test-Path $keep_list) { + Get-Content $keep_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path "${_}.class") { + Copy-Item -Path "${_}.class" -Recurse -Destination (Join-Path $root "rt_keep_class") + } + } + } + + if(Test-Path $del_list) { + Get-Content $del_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } + Copy-Item -Recurse -Force -Path "$(Join-Path $root "rt_keep_class")/*" -Destination . + Remove-Item -Force -Recurse -Path (Join-Path $root "rt_keep_class") + + # 2.5. Restruct rt.jar + jar -cfm (Join-Path $root "jre\lib\rt.jar") META-INF/MANIFEST.MF ./* + } finally { + Pop-Location + } + if(Test-Path $path) { + Remove-Item -Force -Recurse $path + } + Write-Host "done" +} + +# Strip the debug info from all jar files +function Strip-Jar() { + # pack200 is not available from Java 14 onwards + if($java_major_version -ge 14) { + return + } + + # Using pack200 to strip debug info in jars + Write-Host "INFO: Strip debug info from jar files" + Get-ChildItem -Recurse -Include *.jar -Path .\* | ForEach-Object { + Strip-DebugFromJar $_ + } +} + +# Remove all debuginfo files +function Remove-DebugInfoFiles() { + Write-Host -NoNewline "INFO: Removing all .debuginfo files..." + Get-ChildItem -Path .\* -Include *.debuginfo -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove all src.zip files +function Remove-SrcZipFiles() { + Write-Host -NoNewline "INFO: Removing all src.zip files..." + Get-ChildItem -Path .\* -Include *src*zip -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove unnecessary jmod files +function Remove-JmodFiles() { + $path = Join-Path $target "jmods" + if(Test-Path $path) { + Push-Location $path + try { + if(Test-Path $del_jmod_list) { + Get-Content $del_jmod_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } + } finally { + Pop-Location + } + } +} + +# Remove unnecessary tools +function Remove-BinFiles() { + Write-Host -NoNewline "INFO: Trimming bin dir..." + $path = Join-Path $target "bin" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_bin_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Remove unnecessary tools and jars from lib dir +function Remove-LibFiles() { + Write-Host -NoNewline "INFO: Trimming lib dir..." + $path = Join-Path $target "lib" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_lib_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Create a new target directory and copy over the source contents. +Set-Location $basedir +New-Item -ItemType Directory $target -Force | Out-Null +Write-Host "Copying ${src} to ${target}..." +Copy-Item -Recurse -Force -Path $src\* -Destination $target + +Push-Location $target +try{ + $root=Get-Location + Write-Host "Trimming files..." + + # Remove examples documentation and sources. + @("demo", "sample", "man") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force -Path $_ + } + } + + # jre dir may not be present on all builds. + if(Test-Path (Join-Path $target "jre")) { + # Trim file in jre dir. + Trim-JREFiles + + # Trim file in jre/lib dir. + Trim-JRELibFiles + + # Trim unneeded rt.jar classes. + Trim-RTJarClasses + } + + # Strip all remaining jar files of debug info. + Strip-Jar + + # Remove all debuginfo files + Remove-DebugInfoFiles + + # Remove all src.zip files + Remove-SrcZipFiles + + # Remove unnecessary jmod files + Remove-JmodFiles + + # Remove unnecessary tools and jars from lib dir + Remove-LibFiles + + # Remove unnecessary tools + Remove-BinFiles + + # Remove temp folders + @((Join-Path $root "jre\lib\slim"), $src) | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +} finally { + Pop-Location +} + +Move-Item -Path $target -Destination $src -Force +Set-Location $pwd +Write-Host "Done" diff --git a/16/jre/windows/nanoserver-1809/slim-java_bin_del.list b/16/jre/windows/nanoserver-1809/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jre/windows/nanoserver-1809/slim-java_jmod_del.list b/16/jre/windows/nanoserver-1809/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jre/windows/nanoserver-1809/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jre/windows/nanoserver-1809/slim-java_lib_del.list b/16/jre/windows/nanoserver-1809/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jre/windows/nanoserver-1809/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jre/windows/nanoserver-1809/slim-java_rtjar_del.list b/16/jre/windows/nanoserver-1809/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jre/windows/nanoserver-1809/slim-java_rtjar_keep.list b/16/jre/windows/nanoserver-1809/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jre/windows/nanoserver-1809/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jre/windows/nanoserver-1909/Dockerfile.hotspot.nightly.full b/16/jre/windows/nanoserver-1909/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..37396131f --- /dev/null +++ b/16/jre/windows/nanoserver-1909/Dockerfile.hotspot.nightly.full @@ -0,0 +1,49 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne 'b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" diff --git a/16/jre/windows/nanoserver-1909/Dockerfile.hotspot.nightly.slim b/16/jre/windows/nanoserver-1909/Dockerfile.hotspot.nightly.slim new file mode 100644 index 000000000..33eb5e14b --- /dev/null +++ b/16/jre/windows/nanoserver-1909/Dockerfile.hotspot.nightly.slim @@ -0,0 +1,52 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne 'b003256714a22ac3c46fe6cf0af14619d93384efa15f5976617d4bba05929e38') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" diff --git a/16/jre/windows/nanoserver-1909/Dockerfile.openj9.nightly.full b/16/jre/windows/nanoserver-1909/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..8e4b31570 --- /dev/null +++ b/16/jre/windows/nanoserver-1909/Dockerfile.openj9.nightly.full @@ -0,0 +1,50 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/nanoserver-1909/Dockerfile.openj9.nightly.slim b/16/jre/windows/nanoserver-1909/Dockerfile.openj9.nightly.slim new file mode 100644 index 000000000..f8d98df3e --- /dev/null +++ b/16/jre/windows/nanoserver-1909/Dockerfile.openj9.nightly.slim @@ -0,0 +1,53 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["pwsh", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +COPY slim-java* C:/ProgramData/Java/ + +USER ContainerAdministrator +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + Invoke-WebRequest -Uri https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.zip -O 'openjdk.zip'; \ + Write-Host ('Verifying sha256 (42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e) ...'); \ + if ((Get-FileHash openjdk.zip -Algorithm sha256).Hash -ne '42d4c55518e7f537ddb5a1d5056acf6745a5ed3b49512b76cf4f927428ae8d8e') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + Write-Host 'Expanding Zip ...'; \ + Expand-Archive -Path openjdk.zip -DestinationPath C:\ ; \ + $jdkDirectory=(Get-ChildItem -Directory | ForEach-Object { $_.FullName } | Select-String 'jdk'); \ + Move-Item -Path $jdkDirectory C:\openjdk-16; \ + & C:/ProgramData/Java/slim-java.ps1 C:\openjdk-16; \ + Write-Host 'Removing openjdk.zip ...'; \ + Remove-Item openjdk.zip -Force + +USER ContainerUser +ENV JAVA_HOME=C:\\openjdk-16 \ + ProgramFiles="C:\\Program Files" \ + WindowsPATH="C:\\Windows\\system32;C:\\Windows" +ENV PATH="${WindowsPATH};${ProgramFiles}\\PowerShell;${JAVA_HOME}\\bin" +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/nanoserver-1909/slim-java.ps1 b/16/jre/windows/nanoserver-1909/slim-java.ps1 new file mode 100644 index 000000000..bdb207a49 --- /dev/null +++ b/16/jre/windows/nanoserver-1909/slim-java.ps1 @@ -0,0 +1,375 @@ +# +# 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. +# +[CmdletBinding()] +Param( + [Parameter(Position=0, Mandatory=$true)] + [String] + $Src +) + +$ErrorActionPreference = "Stop" + +$env:PATH = "$(Join-Path $Src 'bin');${env:PATH}" + +$pwd = Get-Location + +# Which major java version +function Get-JavaVersion() { + $verstring = (Get-Command java.exe | Select-Object -ExpandProperty Version).ToString() + + switch -wildcard ($verstring) { + "8.*" { return 8; break } + "9.*" { return 9; break } + "10*" { return 10; break } + "11*" { return 11; break } + "12*" { return 12; break } + "13*" { return 13; break } + "14*" { return 14; break } + default { + Write-Error "Unknown Java Version: $verstring" + exit 1 + } + } +} + +function Test-CommandExists($command) { + $oldPreference = $ErrorActionPreference + $ErrorActionPreference = 'stop' + $res = $false + try { + if(Get-Command $command) { + $res = $true + } + } catch { + $res = $false + } finally { + $ErrorActionPreference=$oldPreference + } + return $res +} + +# Set the java major version that we are on right now. +$java_major_version = Get-JavaVersion + +# Validate prerequisites(tools) necessary for making a slim build +$tools = @("jar", "jarsigner") +if($java_major_version -lt 14) { + $tools += "pack200" +} + +foreach($tool in $tools) { + if(-not (Test-CommandExists $tool)) { + Write-Error "${tool} not found, please add ${tool} into PATH" + exit 1 + } +} + +# Store necessary directories paths +$basedir=Split-Path -Parent $Src +$target=Join-Path $basedir "slim" + +# Files for Keep and Del list of classes in rt.jar +$keep_list=Join-Path $PSScriptRoot "slim-java_rtjar_keep.list" +$del_list=Join-Path $PSScriptRoot "slim-java_rtjar_del.list" +# jmod files to be deleted +$del_jmod_list=Join-Path $PSScriptRoot "slim-java_jmod_del.list" +# bin files to be deleted +$del_bin_list=Join-Path $PSScriptRoot "slim-java_bin_del.list" +# lib files to be deleted +$del_lib_list=Join-Path $PSScriptRoot "slim-java_lib_del.list" + +# We only support 64 bit builds now +$proc_type="64bit" + +# Find the arch specific dir in jre/lib based on current arch +function Parse-PlatformSpecific() { + return "amd64" +} + +# Which vm implementation are we running on at the moment. +function Get-VMImplementation() { + $impl=& cmd /c "java -version 2>&1" + if($impl -match "OpenJ9") { + return "OpenJ9" + } + return "Hotspot" +} + +# Strip debug symbols from the given jar file. +function Strip-DebugFromJar([string] $jar) { + $isSigned=(jarsigner -verify "${jar}" | Out-String).Contains('jar verified') + if(!$isSigned) { + Write-Host " Stripping debug info in ${jar}" + pack200 --repack --strip-debug -J-Xmx1024m "${jar}.new" "${jar}" + Move-Item -Path "${jar}.new" -Destination "${jar}" -Force + } +} + +# Trim the files in jre/lib dir +function Trim-JRELibFiles() { + Write-Host -NoNewline "INFO: Trimming jre/lib dir..." + $path = Join-Path $target "jre/lib" + if(Test-Path $path) { + Push-Location $path + try { + @("applet", "boot", "ddr", "deploy", "destkop", "endorsed", "images/icons", "locale", "oblique-fonts", "security/javaws.policy", "aggressive.jar", "deploy.jar", "javaws.jar", "jexec", "jlm.src.jar", "plugin.jar") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } + + Push-Location "ext" + try { + @("dnsns.jar", "dtfj*.jar", "nashorn.jar", "traceformat.jar") | ForEach-Object { + if($_ -match '\*') { + Remove-Item -Force -Recurse -Path .\* -Include $_ + } elseif(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } finally { + Pop-Location + } + + # Derive arch from current platorm. + $lib_arch_dir=Parse-PlatformSpecific + if(Test-Path $lib_arch_dir) { + Push-Location $lib_arch_dir + try { + #rm -rf classic/ libdeploy.so libjavaplugin_* libjsoundalsa.so libnpjp2.so libsplashscreen.so + # Only remove the default dir for 64bit versions + if($proc_type -eq "64bit" -and (Test-Path "default")) { + Remove-Item -Recurse -Force "default" + } + } finally { + Pop-Location + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the files in the jre dir +function Trim-JREFiles() { + Write-Host -NoNewline "INFO: Trimming jre dir..." + $path = Join-Path $target "jre" + if(Test-Path $path) { + Push-Location $path + try { + @("ASSEMBLY_EXCEPTION", "LICENSE", "THIRD_PARTY_README") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +# rm -rf bin +# ln -s ../bin bin + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Trim the rt.jar classes. The classes deleted are as per slim-java_rtjar_del.list +function Trim-RTJarClasses() { + # 2.4 Remove classes in rt.jar + Write-Host -NoNewline "INFO: Trimming classes in rt.jar..." + $path = Join-Path $root "rt_class" + New-Item -ItemType Directory -Path $path -Force | Out-Null + Push-Location $path + try { + jar -xf (Join-Path $root "jre/lib/rt.jar") + New-Item -ItemType Directory -Path (Join-Path $root "rt_keep_class") -Force | Out-Null + if(Test-Path $keep_list) { + Get-Content $keep_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path "${_}.class") { + Copy-Item -Path "${_}.class" -Recurse -Destination (Join-Path $root "rt_keep_class") + } + } + } + + if(Test-Path $del_list) { + Get-Content $del_list | Where-Object { $_ -notmatch '^#' -and ![string]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse -Path $_ + } + } + } + Copy-Item -Recurse -Force -Path "$(Join-Path $root "rt_keep_class")/*" -Destination . + Remove-Item -Force -Recurse -Path (Join-Path $root "rt_keep_class") + + # 2.5. Restruct rt.jar + jar -cfm (Join-Path $root "jre\lib\rt.jar") META-INF/MANIFEST.MF ./* + } finally { + Pop-Location + } + if(Test-Path $path) { + Remove-Item -Force -Recurse $path + } + Write-Host "done" +} + +# Strip the debug info from all jar files +function Strip-Jar() { + # pack200 is not available from Java 14 onwards + if($java_major_version -ge 14) { + return + } + + # Using pack200 to strip debug info in jars + Write-Host "INFO: Strip debug info from jar files" + Get-ChildItem -Recurse -Include *.jar -Path .\* | ForEach-Object { + Strip-DebugFromJar $_ + } +} + +# Remove all debuginfo files +function Remove-DebugInfoFiles() { + Write-Host -NoNewline "INFO: Removing all .debuginfo files..." + Get-ChildItem -Path .\* -Include *.debuginfo -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove all src.zip files +function Remove-SrcZipFiles() { + Write-Host -NoNewline "INFO: Removing all src.zip files..." + Get-ChildItem -Path .\* -Include *src*zip -Recurse | ForEach-Object { + Remove-Item -Force $_.FullName + } + Write-Host "done" +} + +# Remove unnecessary jmod files +function Remove-JmodFiles() { + $path = Join-Path $target "jmods" + if(Test-Path $path) { + Push-Location $path + try { + if(Test-Path $del_jmod_list) { + Get-Content $del_jmod_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } + } finally { + Pop-Location + } + } +} + +# Remove unnecessary tools +function Remove-BinFiles() { + Write-Host -NoNewline "INFO: Trimming bin dir..." + $path = Join-Path $target "bin" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_bin_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Remove unnecessary tools and jars from lib dir +function Remove-LibFiles() { + Write-Host -NoNewline "INFO: Trimming lib dir..." + $path = Join-Path $target "lib" + if(Test-Path $path) { + Push-Location $path + try { + Get-Content $del_lib_list | Where-Object { $_ -notmatch '^#' -and ![String]::IsNullOrWhitespace($_) } | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force $_ + } + } + } finally { + Pop-Location + } + } + Write-Host "done" +} + +# Create a new target directory and copy over the source contents. +Set-Location $basedir +New-Item -ItemType Directory $target -Force | Out-Null +Write-Host "Copying ${src} to ${target}..." +Copy-Item -Recurse -Force -Path $src\* -Destination $target + +Push-Location $target +try{ + $root=Get-Location + Write-Host "Trimming files..." + + # Remove examples documentation and sources. + @("demo", "sample", "man") | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Recurse -Force -Path $_ + } + } + + # jre dir may not be present on all builds. + if(Test-Path (Join-Path $target "jre")) { + # Trim file in jre dir. + Trim-JREFiles + + # Trim file in jre/lib dir. + Trim-JRELibFiles + + # Trim unneeded rt.jar classes. + Trim-RTJarClasses + } + + # Strip all remaining jar files of debug info. + Strip-Jar + + # Remove all debuginfo files + Remove-DebugInfoFiles + + # Remove all src.zip files + Remove-SrcZipFiles + + # Remove unnecessary jmod files + Remove-JmodFiles + + # Remove unnecessary tools and jars from lib dir + Remove-LibFiles + + # Remove unnecessary tools + Remove-BinFiles + + # Remove temp folders + @((Join-Path $root "jre\lib\slim"), $src) | ForEach-Object { + if(Test-Path $_) { + Remove-Item -Force -Recurse $_ + } + } +} finally { + Pop-Location +} + +Move-Item -Path $target -Destination $src -Force +Set-Location $pwd +Write-Host "Done" diff --git a/16/jre/windows/nanoserver-1909/slim-java_bin_del.list b/16/jre/windows/nanoserver-1909/slim-java_bin_del.list new file mode 100644 index 000000000..9977ba113 --- /dev/null +++ b/16/jre/windows/nanoserver-1909/slim-java_bin_del.list @@ -0,0 +1,42 @@ +# +# 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. +# +appletviewer +extcheck +idlj +jarsigner +javah +javap +jconsole +jdmpview +jdb +jhat +jjs +jmap +jrunscript +jstack +jstat +jstatd +native2ascii +orbd +policytool +rmic +tnameserv +schemagen +serialver +servertool +tnameserv +traceformat +wsgen +wsimport +xjc diff --git a/16/jre/windows/nanoserver-1909/slim-java_jmod_del.list b/16/jre/windows/nanoserver-1909/slim-java_jmod_del.list new file mode 100644 index 000000000..c6b762c0e --- /dev/null +++ b/16/jre/windows/nanoserver-1909/slim-java_jmod_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +java.activation.jmod +java.corba.jmod +java.transaction.jmod +java.xml.ws.jmod +java.xml.ws.annotation.jmod +java.desktop.jmod +java.datatransfer.jmod +jdk.scripting.nashorn.jmod +jdk.scripting.nashorn.shell.jmod +jdk.jconsole.jmod +java.scripting.jmod +java.se.ee.jmod +java.se.jmod + +java.sql.jmod +java.sql.rowset.jmod + +# +#java.base.jmod +#java.compiler.jmod +#java.instrument.jmod +#java.logging.jmod +#java.management.jmod +#java.management.rmi.jmod +#java.naming.jmod +#java.prefs.jmod +#java.rmi.jmod +#java.security.jgss.jmod +#java.security.sasl.jmod +#java.smartcardio.jmod +#java.xml.bind.jmod +#java.xml.crypto.jmod +#java.xml.jmod +#jdk.accessibility.jmod +#jdk.aot.jmod +#jdk.attach.jmod +#jdk.charsets.jmod +#jdk.compiler.jmod +#jdk.crypto.cryptoki.jmod +#jdk.crypto.ec.jmod +#jdk.dynalink.jmod +#jdk.editpad.jmod +#jdk.hotspot.agent.jmod +#jdk.httpserver.jmod +#jdk.incubator.httpclient.jmod +#jdk.internal.ed.jmod +#jdk.internal.jvmstat.jmod +#jdk.internal.le.jmod +#jdk.internal.opt.jmod +#jdk.internal.vm.ci.jmod +#jdk.internal.vm.compiler.jmod +#jdk.internal.vm.compiler.management.jmod +#jdk.jartool.jmod +#jdk.javadoc.jmod +#jdk.jcmd.jmod +#jdk.jdeps.jmod +#jdk.jdi.jmod +#jdk.jdwp.agent.jmod +#jdk.jlink.jmod +#jdk.jshell.jmod +#jdk.jsobject.jmod +#jdk.jstatd.jmod +#jdk.localedata.jmod +#jdk.management.agent.jmod +#jdk.management.jmod +#jdk.naming.dns.jmod +#jdk.naming.rmi.jmod +#jdk.net.jmod +#jdk.pack.jmod +#jdk.rmic.jmod +#jdk.sctp.jmod +#jdk.security.auth.jmod +#jdk.security.jgss.jmod +#jdk.unsupported.jmod +#jdk.xml.bind.jmod +#jdk.xml.dom.jmod +#jdk.xml.ws.jmod +#jdk.zipfs.jmod diff --git a/16/jre/windows/nanoserver-1909/slim-java_lib_del.list b/16/jre/windows/nanoserver-1909/slim-java_lib_del.list new file mode 100644 index 000000000..d79537f0c --- /dev/null +++ b/16/jre/windows/nanoserver-1909/slim-java_lib_del.list @@ -0,0 +1,14 @@ +# +# 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. +# +jexec diff --git a/16/jre/windows/nanoserver-1909/slim-java_rtjar_del.list b/16/jre/windows/nanoserver-1909/slim-java_rtjar_del.list new file mode 100644 index 000000000..c4864f7b0 --- /dev/null +++ b/16/jre/windows/nanoserver-1909/slim-java_rtjar_del.list @@ -0,0 +1,91 @@ +# +# 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. +# +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory +META-INF/services/com.sun.tools.xjc.Plugin +META-INF/services/com.sun.tools.attach.spi.AttachProvider +META-INF/services/com.sun.jdi.connect.Connector +META-INF/services/com.sun.jdi.connect.spi.TransportService +com/sun/codemodel/ +com/sun/codemodel/ +com/sun/corba +com/sun/crypto/provider/ +com/sun/istack/internal/tools/ +com/sun/istack/internal/ws/ +com/sun/javadoc/ +com/sun/jdi/ +com/sun/jarsigner/ +com/sun/java/swing/plaf/gtk +com/sun/java/swing/plaf/motif +com/sun/java/swing/plaf/nimbus +com/sun/java/swing/plaf/windows +com/sun/java/swing/plaf/com/sun/javadoc/ +com/sun/jdi/ +com/sun/mirror/ +com/sun/net/ssl/internal/ssl/ +com/sun/source/ +com/sun/tools/ +com/sun/tools/attach/ +com/sun/tools/classfile/ +com/sun/tools/javap/ +com/sun/tools/script/shell/ +com/sun/xml/internal/dtdparser/ +com/sun/xml/internal/rngom/ +com/sun/xml/internal/xsom/ +javax/crypto/ +org/relaxng/datatype/ +sun/applet/ +sun/awt/HKSCS.class +sun/awt/motif/X11GB2312$Decoder.class +sun/awt/motif/X11GB2312$Encoder.class +sun/awt/motif/X11GB2312.class +sun/awt/motif/X11GBK$Encoder.class +sun/awt/motif/X11GBK.class +sun/awt/motif/X11KSC5601$Decoder.class +sun/awt/motif/X11KSC5601$Encoder.class +sun/awt/motif/X11KSC5601.class +sun/awt/motif/ +sun/awt/X11/ +sun/applet/ +sun/java2d/opengl/ +sun/jvmstat/ +sun/nio/cs/ext/ +sun/rmi/rmic/ +sun/security/internal/ +sun/security/ssl/ +sun/security/tools/JarBASE64Encoder.class +sun/security/tools/JarSigner.class +sun/security/tools/JarSignerParameters.class +sun/security/tools/JarSignerResources*.class +sun/security/tools/SignatureFile$Block.class +sun/security/tools/SignatureFile.class +sun/security/tools/TimestampedSigner.class +sun/security/rsa/SunRsaSign.class +sun/tools/asm/ +sun/tools/attach/ +sun/tools/java/ +sun/tools/javac/ +sun/tools/jcmd/ +sun/tools/jconsole/ +sun/tools/jinfo/ +sun/tools/jmap/ +sun/tools/jps/ +sun/tools/jstack/ +sun/tools/jstat/ +sun/tools/jstatd/ +sun/tools/native2ascii/ +sun/tools/serialver/ +sun/tools/tree/ +sun/tools/util/ diff --git a/16/jre/windows/nanoserver-1909/slim-java_rtjar_keep.list b/16/jre/windows/nanoserver-1909/slim-java_rtjar_keep.list new file mode 100644 index 000000000..4fbde1403 --- /dev/null +++ b/16/jre/windows/nanoserver-1909/slim-java_rtjar_keep.list @@ -0,0 +1,35 @@ +# +# 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. +# +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/applet/AppletAudioClip +sun/awt/motif/MFontConfiguration +sun/awt/X11/OwnershipListener +sun/awt/X11/XAWTXSettings +sun/awt/X11/XAWTLookAndFeel +sun/awt/X11/XBaseWindow +sun/awt/X11/XCanvasPeer +sun/awt/X11/XComponentPeer +sun/awt/X11/XClipboard +sun/awt/X11/XCustomCursor +sun/awt/X11/XDataTransferer +sun/awt/X11/XEmbedCanvasPeer +sun/awt/X11/XEmbeddedFrame +sun/awt/X11/XEventDispatcher +sun/awt/X11/XFontPeer +sun/awt/X11/XMouseDragGestureRecognizer +sun/awt/X11/XMSelectionListener +sun/awt/X11/XRootWindow +sun/awt/X11/XToolkit +sun/awt/X11/XWindow +sun/java2d/opengl/GLXVolatileSurfaceManager diff --git a/16/jre/windows/windowsservercore-1809/Dockerfile.hotspot.nightly.full b/16/jre/windows/windowsservercore-1809/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..f9c9b83b7 --- /dev/null +++ b/16/jre/windows/windowsservercore-1809/Dockerfile.hotspot.nightly.full @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force diff --git a/16/jre/windows/windowsservercore-1809/Dockerfile.hotspot.releases.full b/16/jre/windows/windowsservercore-1809/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..fab463772 --- /dev/null +++ b/16/jre/windows/windowsservercore-1809/Dockerfile.hotspot.releases.full @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk-16+36 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_windows_hotspot_16_36.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_windows_hotspot_16_36.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (8871544e7e2a5a4ad7ec1d8b976a1fb19b312ab77fcd4681014669341691cc44) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '8871544e7e2a5a4ad7ec1d8b976a1fb19b312ab77fcd4681014669341691cc44') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force diff --git a/16/jre/windows/windowsservercore-1809/Dockerfile.openj9.nightly.full b/16/jre/windows/windowsservercore-1809/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..035b3ad6c --- /dev/null +++ b/16/jre/windows/windowsservercore-1809/Dockerfile.openj9.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (d3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'd3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/windowsservercore-1809/Dockerfile.openj9.releases.full b/16/jre/windows/windowsservercore-1809/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..c8f03fdfc --- /dev/null +++ b/16/jre/windows/windowsservercore-1809/Dockerfile.openj9.releases.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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 jdk-16+36_openj9-0.25.0 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_windows_openj9_16_36_openj9-0.25.0.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_windows_openj9_16_36_openj9-0.25.0.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (49e6a468a50b65f7b3839881bca7a7fbea1be81d734f1b52662063a6db563387) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '49e6a468a50b65f7b3839881bca7a7fbea1be81d734f1b52662063a6db563387') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/windowsservercore-1909/Dockerfile.hotspot.nightly.full b/16/jre/windows/windowsservercore-1909/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..2cd9ee866 --- /dev/null +++ b/16/jre/windows/windowsservercore-1909/Dockerfile.hotspot.nightly.full @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force diff --git a/16/jre/windows/windowsservercore-1909/Dockerfile.openj9.nightly.full b/16/jre/windows/windowsservercore-1909/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..33a474cf8 --- /dev/null +++ b/16/jre/windows/windowsservercore-1909/Dockerfile.openj9.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:1909 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (d3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'd3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.nightly.full b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..635f92cf1 --- /dev/null +++ b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.nightly.full @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force diff --git a/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.releases.full b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.releases.full new file mode 100644 index 000000000..7a276e5c2 --- /dev/null +++ b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.hotspot.releases.full @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk-16+36 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_windows_hotspot_16_36.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36/OpenJDK16-jre_x64_windows_hotspot_16_36.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (8871544e7e2a5a4ad7ec1d8b976a1fb19b312ab77fcd4681014669341691cc44) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '8871544e7e2a5a4ad7ec1d8b976a1fb19b312ab77fcd4681014669341691cc44') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force diff --git a/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.openj9.nightly.full b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..6c44387fa --- /dev/null +++ b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.openj9.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (d3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'd3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.openj9.releases.full b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.openj9.releases.full new file mode 100644 index 000000000..82977c8ab --- /dev/null +++ b/16/jre/windows/windowsservercore-ltsc2016/Dockerfile.openj9.releases.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2016 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk-16+36_openj9-0.25.0 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_windows_openj9_16_36_openj9-0.25.0.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16%2B36_openj9-0.25.0/OpenJDK16-jre_x64_windows_openj9_16_36_openj9-0.25.0.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (49e6a468a50b65f7b3839881bca7a7fbea1be81d734f1b52662063a6db563387) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '49e6a468a50b65f7b3839881bca7a7fbea1be81d734f1b52662063a6db563387') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle" diff --git a/16/jre/windows/windowsservercore-ltsc2019/Dockerfile.hotspot.nightly.full b/16/jre/windows/windowsservercore-ltsc2019/Dockerfile.hotspot.nightly.full new file mode 100644 index 000000000..8a39ac8ed --- /dev/null +++ b/16/jre/windows/windowsservercore-ltsc2019/Dockerfile.hotspot.nightly.full @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2019 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_hotspot_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne '5e6ea5c30f827b10ff05ab437cd51a1e194d0ffc3fd8ee6c7c8a5b6d73256538') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force diff --git a/16/jre/windows/windowsservercore-ltsc2019/Dockerfile.openj9.nightly.full b/16/jre/windows/windowsservercore-ltsc2019/Dockerfile.openj9.nightly.full new file mode 100644 index 000000000..7e863c00c --- /dev/null +++ b/16/jre/windows/windowsservercore-ltsc2019/Dockerfile.openj9.nightly.full @@ -0,0 +1,44 @@ +# ------------------------------------------------------------------------------ +# NOTE: THIS DOCKERFILE IS GENERATED VIA "build_latest.sh" or "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:ltsc2019 + +# $ProgressPreference: https://github.com/PowerShell/PowerShell/issues/2138#issuecomment-251261324 +SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] + +ENV JAVA_VERSION jdk16 + +RUN Write-Host ('Downloading https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi ...'); \ + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ + wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk16-2021-03-13-03-17/OpenJDK16-jre_x64_windows_openj9_2021-03-13-03-17.msi -O 'openjdk.msi'; \ + Write-Host ('Verifying sha256 (d3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4) ...'); \ + if ((Get-FileHash openjdk.msi -Algorithm sha256).Hash -ne 'd3fa6980c77130d59a7723585938897c7602a3d25def3c3895ee48a41ff173c4') { \ + Write-Host 'FAILED!'; \ + exit 1; \ + }; \ + \ + New-Item -ItemType Directory -Path C:\temp | Out-Null; \ + \ + Write-Host 'Installing using MSI ...'; \ + Start-Process -FilePath "msiexec.exe" -ArgumentList '/i', 'openjdk.msi', '/L*V', 'C:\temp\OpenJDK.log', \ + '/quiet', 'ADDLOCAL=FeatureEnvironment,FeatureJarFileRunWith,FeatureJavaHome' -Wait -Passthru; \ + Remove-Item -Path C:\temp -Recurse | Out-Null; \ + Write-Host 'Removing openjdk.msi ...'; \ + Remove-Item openjdk.msi -Force +ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle"