forked from adoptium/containers
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #130 from ramachandrabolisetti/nov_24-preview_1
Update EA docker files for Nov 24 preview 1
- Loading branch information
Showing
24 changed files
with
1,712 additions
and
755 deletions.
There are no files selected for viewing
110 changes: 110 additions & 0 deletions
110
11-ea/jdk/ubi-minimal/ubi8/Dockerfile.open.releases.full
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
# (C) Copyright IBM Corporation 2024, 2024 | ||
# | ||
# 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:latest | ||
|
||
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="IBM Semeru Runtime EA" \ | ||
vendor="International Business Machines Corporation" \ | ||
version="jdk-11.0.26+2_nov_24-preview_1" \ | ||
release="11" \ | ||
run="docker run --rm -ti <image_name:tag> /bin/bash" \ | ||
summary="IBM Semeru Runtime EA Docker Image for OpenJDK with openj9 and ubi-minimal" \ | ||
description="For more information on this image please see https://github.com/ibmruntimes/semeru-containers/blob/master/README.md" | ||
|
||
ENV JAVA_VERSION jdk-11.0.26+2_nov_24-preview_1 | ||
|
||
RUN set -eux; \ | ||
ARCH="$(uname -m)"; \ | ||
case "${ARCH}" in \ | ||
aarch64|arm64) \ | ||
ESUM='e1d84a953f104ca498772a713884482e36b8bf2da86c414b970edbd85fd06e01'; \ | ||
BINARY_URL='https://github.com/ibmruntimes/semeru11-ea-binaries/releases/download/jdk-11.0.26%2B2_nov_24-preview_1/ibm-semeru-open-jdk_aarch64_linux_11.0.26_2_november_24_preview_1.tar.gz'; \ | ||
;; \ | ||
amd64|x86_64) \ | ||
ESUM='bf4c04435e7a47cacd2ee59cc075763c94f6c6dfc0a670ff0965174c10451aa4'; \ | ||
BINARY_URL='https://github.com/ibmruntimes/semeru11-ea-binaries/releases/download/jdk-11.0.26%2B2_nov_24-preview_1/ibm-semeru-open-jdk_x64_linux_11.0.26_2_november_24_preview_1.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/java-ea; \ | ||
cd /opt/java/java-ea; \ | ||
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \ | ||
rm -rf /tmp/openjdk.tar.gz; | ||
|
||
ENV JAVA_HOME=/opt/java/java-ea \ | ||
PATH="/opt/java/java-ea/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="537dbbfc03b37312c2ec282c6906828298cb74e42aca6e3e6835d44bf6923fd8c5db77e98bf6ce9ef19e1922729de53b20546149176e07ac04087df786a62fd9"; \ | ||
TOMCAT_DWNLD_URL="https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.97/bin/apache-tomcat-9.0.97.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"] | ||
USER 1001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.