Skip to content

Commit

Permalink
Merge pull request #136 from ramachandrabolisetti/noble
Browse files Browse the repository at this point in the history
Add ubuntu24.04 (noble) support for Semeru releases
  • Loading branch information
jayasg12 authored Feb 12, 2025
2 parents 7c11d1b + 0bef83e commit 265a033
Show file tree
Hide file tree
Showing 16 changed files with 1,797 additions and 0 deletions.
114 changes: 114 additions & 0 deletions 11/jdk/ubuntu/noble/Dockerfile.certified.releases.full
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# (C) Copyright IBM Corporation 2025, 2025
#
# 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:24.04
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl 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 11.0.25.0

RUN set -eux; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
amd64|x86_64) \
ESUM='5b91ac2e9dd8c6041fbd4dbc029c6455eb6cff26c1c4e94cf1f3f3f8408a11a9'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jdk_x64_linux_11.0.25.0.tar.gz'; \
;; \
ppc64el|ppc64le) \
ESUM='133c50613b8530ea859daf9b34df507cf7f1595c82c8730b7d01270497fd81c5'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jdk_ppc64le_linux_11.0.25.0.tar.gz'; \
;; \
s390x) \
ESUM='9ab8b9f5b5f7e68b6feeaa910865eb9fcfc64a493472bbebe33ec3f9dc3b5d40'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jdk_s390x_linux_11.0.25.0.tar.gz'; \
;; \
aarch64|arm64) \
ESUM='0603dcb9cc493c01a3697bcd07370454a62939a0d4220d3c6070e8fdb4fbed9c'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jdk_aarch64_linux_11.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/ibm/; \
cd /opt/ibm/; \
tar -xf /tmp/openjdk.tar.gz ; \
mkdir -p /licenses; \
mv /opt/ibm/jdk-11* /opt/ibm/java; \
cp /opt/ibm/java/legal/java.base/license/license_en.txt /licenses; \
rm -rf /tmp/openjdk.tar.gz;

ENV JAVA_HOME=/opt/ibm/java \
PATH="/opt/ibm/java/bin:$PATH"
ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+PortableSharedCache -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/ibm/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/ibm/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="bf406b3e288e1732d82d08f54e160095451a6cc969f72adf395c074d6d08893ef1ccd2afcd55f01ca8e54131f587c88055832f36330a1ede0cc2f84440cf54df"; \
TOMCAT_DWNLD_URL="https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.99/bin/apache-tomcat-9.0.99.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/ibm/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \
export OPENJ9_JAVA_OPTIONS="-XX:+IProfileDuringStartupPhase -Xshareclasses:name=dry_run_scc,cacheDir=/opt/ibm/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/ibm/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/ibm/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/ibm/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \
unset OPENJ9_JAVA_OPTIONS; \
\
export OPENJ9_JAVA_OPTIONS="-XX:+IProfileDuringStartupPhase -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/ibm/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/ibm/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/ibm/java/.scc" ]; then \
chmod -R 0777 /opt/ibm/java/.scc; \
fi; \
\
echo "SCC generation phase completed";

CMD ["jshell"]
112 changes: 112 additions & 0 deletions 11/jdk/ubuntu/noble/Dockerfile.open.releases.full
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# (C) Copyright IBM Corporation 2025, 2025
#
# 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:24.04

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl 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-11.0.25+9_openj9-0.48.0

RUN set -eux; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
ESUM='73eac0441938990a87d188d8ae3f9de6a0cdb89c3b75e1647411ec0a093ca414'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-open-jdk_aarch64_linux_11.0.25_9_openj9-0.48.0.tar.gz'; \
;; \
amd64|x86_64) \
ESUM='1dc99080a9e1b3b19f0c9c7063d920d9a0ced8b35e5f7c1fc9f6769c5a9c6a37'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-open-jdk_x64_linux_11.0.25_9_openj9-0.48.0.tar.gz'; \
;; \
ppc64el|ppc64le) \
ESUM='8bdeed45af4087352e969f1206fe697473b1fa2ee2e75e671bc32c54c38fa420'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-open-jdk_ppc64le_linux_11.0.25_9_openj9-0.48.0.tar.gz'; \
;; \
s390x) \
ESUM='c908ca250d85067813de0fcfad4d9d0f06b4b09c42bba7c446a0250c55f817fb'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-open-jdk_s390x_linux_11.0.25_9_openj9-0.48.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:+PortableSharedCache -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="bf406b3e288e1732d82d08f54e160095451a6cc969f72adf395c074d6d08893ef1ccd2afcd55f01ca8e54131f587c88055832f36330a1ede0cc2f84440cf54df"; \
TOMCAT_DWNLD_URL="https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.99/bin/apache-tomcat-9.0.99.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="-XX:+IProfileDuringStartupPhase -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="-XX:+IProfileDuringStartupPhase -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"]
114 changes: 114 additions & 0 deletions 11/jre/ubuntu/noble/Dockerfile.certified.releases.full
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# (C) Copyright IBM Corporation 2025, 2025
#
# 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:24.04
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl 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 11.0.25.0

RUN set -eux; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
amd64|x86_64) \
ESUM='4a92b3f7a9e5d117f16f3f00a97ce774c728b031a7dda569f9b95a878fcd8ac5'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jre_x64_linux_11.0.25.0.tar.gz'; \
;; \
ppc64el|ppc64le) \
ESUM='3c094ea73b358e5af816f65710ab7dfbd07d6f3a4d6e3532cb268d78b2294c0f'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jre_ppc64le_linux_11.0.25.0.tar.gz'; \
;; \
s390x) \
ESUM='06b4f3571b83a02dd3bb63445c9f6dfbac3bab79843f8f4174cc3059767e2535'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jre_s390x_linux_11.0.25.0.tar.gz'; \
;; \
aarch64|arm64) \
ESUM='daba1549d6f5740c3de9af0d6aec0d8db8f7a2d9f941bbb39487e82c5064ddfd'; \
BINARY_URL='https://github.com/ibmruntimes/semeru11-certified-binaries/releases/download/jdk-11.0.25%2B9_openj9-0.48.0/ibm-semeru-certified-jre_aarch64_linux_11.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/ibm/; \
cd /opt/ibm/; \
tar -xf /tmp/openjdk.tar.gz ; \
mkdir -p /licenses; \
mv /opt/ibm/jdk-11* /opt/ibm/java; \
cp /opt/ibm/java/legal/java.base/license/license_en.txt /licenses; \
rm -rf /tmp/openjdk.tar.gz;

ENV JAVA_HOME=/opt/ibm/java \
PATH="/opt/ibm/java/bin:$PATH"
ENV JAVA_TOOL_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+PortableSharedCache -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/ibm/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/ibm/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="bf406b3e288e1732d82d08f54e160095451a6cc969f72adf395c074d6d08893ef1ccd2afcd55f01ca8e54131f587c88055832f36330a1ede0cc2f84440cf54df"; \
TOMCAT_DWNLD_URL="https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.99/bin/apache-tomcat-9.0.99.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/ibm/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \
export OPENJ9_JAVA_OPTIONS="-XX:+IProfileDuringStartupPhase -Xshareclasses:name=dry_run_scc,cacheDir=/opt/ibm/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/ibm/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/ibm/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/ibm/java/.scc,bootClassesOnly,nonFatal,createLayer -Xscmx$SCC_SIZE -version; \
unset OPENJ9_JAVA_OPTIONS; \
\
export OPENJ9_JAVA_OPTIONS="-XX:+IProfileDuringStartupPhase -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/ibm/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/ibm/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/ibm/java/.scc" ]; then \
chmod -R 0777 /opt/ibm/java/.scc; \
fi; \
\
echo "SCC generation phase completed";

CMD ["jshell"]
Loading

0 comments on commit 265a033

Please sign in to comment.