From 002deb492de7eb752a878c0c400a8daf4ced3517 Mon Sep 17 00:00:00 2001 From: Gershom Seneviratne Date: Mon, 7 Mar 2022 15:37:01 +0530 Subject: [PATCH 1/3] Added OS base images and Installed JDK 8 and 11 on the base images. --- CHANGELOG.md | 5 ++ dockerfiles/alpine/is/Dockerfile | 64 +++++++++++++++++++--- dockerfiles/centos/is/Dockerfile | 50 +++++++++++++++-- dockerfiles/jdk8/alpine/is/Dockerfile | 77 +++++++++++++++++++++++++-- dockerfiles/jdk8/centos/is/Dockerfile | 50 +++++++++++++++-- dockerfiles/ubuntu/is/Dockerfile | 32 +++++++---- 6 files changed, 249 insertions(+), 29 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f39ecc2b..1e41abeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ in each resource release, will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [v5.11.0.11] - 2022-03-07 + +### Changed +- Changed base image of dockerfiles to an OS image and installed relevant jdk on it, instead of directly using a JDK pre installed base image. + ## [v5.11.0.9] - 2022-01-20 ### Changed diff --git a/dockerfiles/alpine/is/Dockerfile b/dockerfiles/alpine/is/Dockerfile index 4a5bed6f..80d35bd0 100755 --- a/dockerfiles/alpine/is/Dockerfile +++ b/dockerfiles/alpine/is/Dockerfile @@ -16,10 +16,48 @@ # # ------------------------------------------------------------------------ -# set base Docker image to AdoptOpenJDK Alpine Docker image -FROM adoptopenjdk/openjdk11:jdk-11.0.11_9-alpine +# set base Docker image to Alpine Docker image +FROM alpine:3.15.0 LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" + +#Install Open JDK = +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +# install JDK Dependencies +RUN apk add --no-cache tzdata musl-locales musl-locales-lang \ + && rm -rf /var/cache/apk/* + + +ENV JAVA_VERSION jdk-11.0.14+9 + + +#Install JDK11 +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + amd64|x86_64) \ + ESUM='f94a01258a5496eda9e3de6807e6ecfe08a5ad4a2d42e4332a77f74174706f5c'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.14_9.tar.gz'; ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory /opt/java/openjdk \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" ENV=${USER_HOME}"/.ashrc" # set Docker image build arguments # build arguments for user/group configurations @@ -38,6 +76,7 @@ ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/relea # build arguments for external artifacts ARG DNS_JAVA_VERSION=2.1.8 ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 +ARG MYSQL_CONNECTOR_VERSION=8.0.17 # build argument for MOTD ARG MOTD='printf "\n\ Welcome to WSO2 Docker Resources \n\ @@ -45,7 +84,6 @@ ARG MOTD='printf "\n\ This Docker container comprises of a WSO2 product, running with its latest GA release \n\ which is under the Apache License, Version 2.0. \n\ Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' -ENV ENV=${USER_HOME}"/.ashrc" # create the non-root user and group and set MOTD login message RUN \ @@ -53,11 +91,23 @@ RUN \ && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ && echo ${MOTD} > "${ENV}" +# create Java prefs dir +# this is to avoid warning logs printed by FileSystemPreferences class +RUN \ + mkdir -p ${USER_HOME}/.java/.systemPrefs \ + && mkdir -p ${USER_HOME}/.java/.userPrefs \ + && chmod -R 755 ${USER_HOME}/.java \ + && chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java + # copy init script to user home COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ # install required packages -RUN apk add --no-cache netcat-openbsd +RUN \ + apk update \ + && apk add --no-cache netcat-openbsd \ + && apk add unzip \ + && apk add wget # add the WSO2 product distribution to user's home directory RUN \ @@ -69,6 +119,8 @@ RUN \ # add libraries for Kubernetes membership scheme based clustering ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins +# add MySQL JDBC connector to server home as a third party library +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ # set the user and work directory USER ${USER_ID} @@ -82,4 +134,4 @@ ENV WORKING_DIRECTORY=${USER_HOME} \ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file diff --git a/dockerfiles/centos/is/Dockerfile b/dockerfiles/centos/is/Dockerfile index e01f6a02..2be80184 100755 --- a/dockerfiles/centos/is/Dockerfile +++ b/dockerfiles/centos/is/Dockerfile @@ -16,10 +16,40 @@ # # ------------------------------------------------------------------------ -# set base Docker image to AdoptOpenJDK CentOS Docker image -FROM adoptopenjdk/openjdk11:x86_64-centos-jdk-11.0.11_9 +# set base Docker image to CentOS Docker image +FROM centos:7 LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" + +#Install Open JDK 11 +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 clean all + +ENV JAVA_VERSION jdk-11.0.13+8 + +RUN set -eux; \ + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ + case "${ARCH}" in \ + amd64|i386:x86-64) \ + ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.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" # set Docker image build arguments # build arguments for user/group configurations @@ -38,19 +68,27 @@ ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/relea # build arguments for external artifacts ARG DNS_JAVA_VERSION=2.1.8 ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 +ARG MYSQL_CONNECTOR_VERSION=8.0.17 # build argument for MOTD ARG MOTD='printf "\n\ Welcome to WSO2 Docker resources.\n\ ------------------------------------ \n\ This Docker container comprises of a WSO2 product, running with its latest GA release \n\ which is under the Apache License, Version 2.0. \n\ -Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' +Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' # create the non-root user and group and set MOTD login message RUN \ groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ && echo ${MOTD} > /etc/profile.d/motd.sh +# create Java prefs dir +# this is to avoid warning logs printed by FileSystemPreferences class +RUN \ + mkdir -p ${USER_HOME}/.java/.systemPrefs \ + && mkdir -p ${USER_HOME}/.java/.userPrefs \ + && chmod -R 755 ${USER_HOME}/.java \ + && chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java # copy init script to user home COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ @@ -74,6 +112,8 @@ RUN \ # add libraries for Kubernetes membership scheme based clustering ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins +# add MySQL JDBC connector to server home as a third party library +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ # set the user and work directory USER ${USER_ID} @@ -87,4 +127,4 @@ ENV WORKING_DIRECTORY=${USER_HOME} \ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file diff --git a/dockerfiles/jdk8/alpine/is/Dockerfile b/dockerfiles/jdk8/alpine/is/Dockerfile index a516de24..28d1b494 100755 --- a/dockerfiles/jdk8/alpine/is/Dockerfile +++ b/dockerfiles/jdk8/alpine/is/Dockerfile @@ -16,10 +16,62 @@ # # ------------------------------------------------------------------------ -# set base Docker image to AdoptOpenJDK Alpine Docker image -FROM adoptopenjdk/openjdk8:jdk8u292-b10-alpine +# set base Docker image to Alpine Docker image +FROM alpine:3.15.0 LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" + +#Install Open JDK 8 +ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' + +# install JDK Dependencies +RUN apk add --no-cache tzdata musl-locales musl-locales-lang \ + && rm -rf /var/cache/apk/* + + +ENV JAVA_VERSION jdk8u322-b06 + +RUN apk --no-progress --purge --no-cache upgrade \ +&& apk --no-progress --purge --no-cache add --upgrade \ + curl \ + wget \ + openssh \ +&& apk --no-progress --purge --no-cache upgrade \ +&& rm -vrf /var/cache/apk/* \ +&& curl --version + +# Install vanilla GLibC: https://github.com/sgerrand/alpine-pkg-glibc +RUN curl -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ +&& curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \ +&& apk add glibc-2.32-r0.apk + +#Install JDK8 +RUN set -eux; \ + apk add --no-cache --virtual .fetch-deps curl; \ + ARCH="$(apk --print-arch)"; \ + case "${ARCH}" in \ + amd64|x86_64) \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ + esac; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory /opt/java/openjdk \ + --strip-components 1 \ + --no-same-owner \ + ; \ + rm -rf /tmp/openjdk.tar.gz; + +ENV JAVA_HOME=/opt/java/openjdk \ + PATH="/opt/java/openjdk/bin:$PATH" ENV=${USER_HOME}"/.ashrc" # set Docker image build arguments # build arguments for user/group configurations @@ -38,6 +90,7 @@ ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/relea # build arguments for external artifacts ARG DNS_JAVA_VERSION=2.1.8 ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 +ARG MYSQL_CONNECTOR_VERSION=8.0.17 # build argument for MOTD ARG MOTD='printf "\n\ Welcome to WSO2 Docker Resources \n\ @@ -53,11 +106,23 @@ RUN \ && adduser -S -u ${USER_ID} -h ${USER_HOME} -G ${USER_GROUP} ${USER} \ && echo ${MOTD} > "${ENV}" +# create Java prefs dir +# this is to avoid warning logs printed by FileSystemPreferences class +RUN \ + mkdir -p ${USER_HOME}/.java/.systemPrefs \ + && mkdir -p ${USER_HOME}/.java/.userPrefs \ + && chmod -R 755 ${USER_HOME}/.java \ + && chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java + # copy init script to user home COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ # install required packages -RUN apk add --no-cache netcat-openbsd +RUN \ + apk update \ + && apk add --no-cache netcat-openbsd \ + && apk add unzip \ + && apk add wget # add the WSO2 product distribution to user's home directory RUN \ @@ -69,6 +134,8 @@ RUN \ # add libraries for Kubernetes membership scheme based clustering ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins +# add MySQL JDBC connector to server home as a third party library +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ # set the user and work directory USER ${USER_ID} @@ -82,4 +149,4 @@ ENV WORKING_DIRECTORY=${USER_HOME} \ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file diff --git a/dockerfiles/jdk8/centos/is/Dockerfile b/dockerfiles/jdk8/centos/is/Dockerfile index f3fce8b8..e626b660 100755 --- a/dockerfiles/jdk8/centos/is/Dockerfile +++ b/dockerfiles/jdk8/centos/is/Dockerfile @@ -16,10 +16,40 @@ # # ------------------------------------------------------------------------ -# set base Docker image to AdoptOpenJDK CentOS Docker image -FROM adoptopenjdk/openjdk8:jdk8u292-b10-centos +# set base Docker image to CentOS Docker image +FROM centos:7 LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" + +#Install Open JDK 8 +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 clean all + +ENV JAVA_VERSION jdk8u322-b06 + +RUN set -eux; \ + ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ + case "${ARCH}" in \ + amd64|i386:x86-64) \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.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" # set Docker image build arguments # build arguments for user/group configurations @@ -38,19 +68,28 @@ ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/relea # build arguments for external artifacts ARG DNS_JAVA_VERSION=2.1.8 ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 +ARG MYSQL_CONNECTOR_VERSION=8.0.17 # build argument for MOTD ARG MOTD='printf "\n\ Welcome to WSO2 Docker resources.\n\ ------------------------------------ \n\ This Docker container comprises of a WSO2 product, running with its latest GA release \n\ which is under the Apache License, Version 2.0. \n\ -Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n\n"' +Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' + # create the non-root user and group and set MOTD login message RUN \ groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ && echo ${MOTD} > /etc/profile.d/motd.sh +# create Java prefs dir +# this is to avoid warning logs printed by FileSystemPreferences class +RUN \ + mkdir -p ${USER_HOME}/.java/.systemPrefs \ + && mkdir -p ${USER_HOME}/.java/.userPrefs \ + && chmod -R 755 ${USER_HOME}/.java \ + && chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java # copy init script to user home COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ @@ -74,6 +113,8 @@ RUN \ # add libraries for Kubernetes membership scheme based clustering ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins +# add MySQL JDBC connector to server home as a third party library +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ # set the user and work directory USER ${USER_ID} @@ -88,3 +129,4 @@ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] +© 2022 GitHub, Inc. diff --git a/dockerfiles/ubuntu/is/Dockerfile b/dockerfiles/ubuntu/is/Dockerfile index a59bd27a..892dc6e3 100755 --- a/dockerfiles/ubuntu/is/Dockerfile +++ b/dockerfiles/ubuntu/is/Dockerfile @@ -16,12 +16,14 @@ # # ------------------------------------------------------------------------ -# set base Docker image to JDK Ubuntu 20.04 Docker image +# set base Docker image to Ubuntu 20.04 Docker image FROM ubuntu:20.04 + LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" + -#Install Open JDK +#Install Open JDK 8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update \ @@ -30,15 +32,15 @@ RUN apt-get update \ && locale-gen en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* -ENV JAVA_VERSION jdk-11.0.13+8 +ENV JAVA_VERSION jdk8u322-b06 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ amd64|x86_64) \ - ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ - BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz'; \ - ;; \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ + ;; \ *) \ echo "Unsupported arch: ${ARCH}"; \ exit 1; \ @@ -71,6 +73,7 @@ ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/relea # build arguments for external artifacts ARG DNS_JAVA_VERSION=2.1.8 ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 +ARG MYSQL_CONNECTOR_VERSION=8.0.17 # build argument for MOTD ARG MOTD="\n\ Welcome to WSO2 Docker resources.\n\ @@ -85,6 +88,14 @@ RUN \ && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ && echo '[ ! -z "${TERM}" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc; echo "${MOTD}" > /etc/motd +# create Java prefs dir +# this is to avoid warning logs printed by FileSystemPreferences class +RUN \ + mkdir -p ${USER_HOME}/.java/.systemPrefs \ + && mkdir -p ${USER_HOME}/.java/.userPrefs \ + && chmod -R 755 ${USER_HOME}/.java \ + && chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java + # copy init script to user home COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ @@ -107,17 +118,20 @@ RUN \ # add libraries for Kubernetes membership scheme based clustering ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins +# add MySQL JDBC connector to server home as a third party library +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ # set the user and work directory USER ${USER_ID} WORKDIR ${USER_HOME} # set environment variables -ENV WORKING_DIRECTORY=${USER_HOME} \ +ENV JAVA_OPTS="-Djava.util.prefs.systemRoot=${USER_HOME}/.java -Djava.util.prefs.userRoot=${USER_HOME}/.java/.userPrefs" \ + WORKING_DIRECTORY=${USER_HOME} \ WSO2_SERVER_HOME=${WSO2_SERVER_HOME} # expose ports EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file From b3cb4c9b56e2a839150b2f6ee0a43bdff19ad497 Mon Sep 17 00:00:00 2001 From: Gershom Seneviratne Date: Tue, 8 Mar 2022 10:57:41 +0530 Subject: [PATCH 2/3] Changed dockerfiles to use adoptium JDK for CentOS 7, Alpine 3.15 and Ubuntu 20.04 --- CHANGELOG.md | 4 +-- dockerfiles/alpine/is/Dockerfile | 40 +++++++++++----------- dockerfiles/centos/is/Dockerfile | 19 ++++++----- dockerfiles/jdk8/alpine/is/Dockerfile | 36 +++++++++----------- dockerfiles/jdk8/centos/is/Dockerfile | 26 +++++++-------- dockerfiles/jdk8/ubuntu/is/Dockerfile | 48 +++++++++++++++++---------- dockerfiles/ubuntu/is/Dockerfile | 22 ++++++------ 7 files changed, 101 insertions(+), 94 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e41abeb..50f7c347 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,10 @@ in each resource release, will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [v5.11.0.11] - 2022-03-07 +## [v5.11.0.11] - 2022-03-08 ### Changed -- Changed base image of dockerfiles to an OS image and installed relevant jdk on it, instead of directly using a JDK pre installed base image. +- Changed base image of dockerfiles to an OS image and installed relevant JDK on it, instead of directly using a JDK installed OS image. ## [v5.11.0.9] - 2022-01-20 diff --git a/dockerfiles/alpine/is/Dockerfile b/dockerfiles/alpine/is/Dockerfile index 80d35bd0..c63b5981 100755 --- a/dockerfiles/alpine/is/Dockerfile +++ b/dockerfiles/alpine/is/Dockerfile @@ -21,39 +21,37 @@ FROM alpine:3.15.0 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" -#Install Open JDK = ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' -# install JDK Dependencies +# Install JDK Dependencies RUN apk add --no-cache tzdata musl-locales musl-locales-lang \ && rm -rf /var/cache/apk/* - ENV JAVA_VERSION jdk-11.0.14+9 - -#Install JDK11 +# Install JDK11 RUN set -eux; \ apk add --no-cache --virtual .fetch-deps curl; \ ARCH="$(apk --print-arch)"; \ case "${ARCH}" in \ - amd64|x86_64) \ - ESUM='f94a01258a5496eda9e3de6807e6ecfe08a5ad4a2d42e4332a77f74174706f5c'; \ - BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.14_9.tar.gz'; ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + amd64|x86_64) \ + ESUM='f94a01258a5496eda9e3de6807e6ecfe08a5ad4a2d42e4332a77f74174706f5c'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ - wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p /opt/java/openjdk; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory /opt/java/openjdk \ - --strip-components 1 \ - --no-same-owner \ - ; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory /opt/java/openjdk \ + --strip-components 1 \ + --no-same-owner \ + ; \ rm -rf /tmp/openjdk.tar.gz; ENV JAVA_HOME=/opt/java/openjdk \ diff --git a/dockerfiles/centos/is/Dockerfile b/dockerfiles/centos/is/Dockerfile index 2be80184..111eb829 100755 --- a/dockerfiles/centos/is/Dockerfile +++ b/dockerfiles/centos/is/Dockerfile @@ -21,25 +21,26 @@ FROM centos:7 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" -#Install Open JDK 11 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +# Install JDK Dependencies RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ && yum clean all ENV JAVA_VERSION jdk-11.0.13+8 +# Install JDK11 RUN set -eux; \ ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ case "${ARCH}" in \ - amd64|i386:x86-64) \ - ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ - BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + amd64|i386:x86-64) \ + ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.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 -; \ diff --git a/dockerfiles/jdk8/alpine/is/Dockerfile b/dockerfiles/jdk8/alpine/is/Dockerfile index 28d1b494..016f6b23 100755 --- a/dockerfiles/jdk8/alpine/is/Dockerfile +++ b/dockerfiles/jdk8/alpine/is/Dockerfile @@ -20,15 +20,12 @@ FROM alpine:3.15.0 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" - -#Install Open JDK 8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' -# install JDK Dependencies +# Install JDK Dependencies RUN apk add --no-cache tzdata musl-locales musl-locales-lang \ && rm -rf /var/cache/apk/* - ENV JAVA_VERSION jdk8u322-b06 RUN apk --no-progress --purge --no-cache upgrade \ @@ -40,7 +37,6 @@ RUN apk --no-progress --purge --no-cache upgrade \ && rm -vrf /var/cache/apk/* \ && curl --version -# Install vanilla GLibC: https://github.com/sgerrand/alpine-pkg-glibc RUN curl -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ && curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \ && apk add glibc-2.32-r0.apk @@ -51,23 +47,23 @@ RUN set -eux; \ ARCH="$(apk --print-arch)"; \ case "${ARCH}" in \ amd64|x86_64) \ - ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ - ;; \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ + ;; \ *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ - wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p /opt/java/openjdk; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory /opt/java/openjdk \ - --strip-components 1 \ - --no-same-owner \ - ; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory /opt/java/openjdk \ + --strip-components 1 \ + --no-same-owner \ + ; \ rm -rf /tmp/openjdk.tar.gz; ENV JAVA_HOME=/opt/java/openjdk \ diff --git a/dockerfiles/jdk8/centos/is/Dockerfile b/dockerfiles/jdk8/centos/is/Dockerfile index e626b660..649f8cfc 100755 --- a/dockerfiles/jdk8/centos/is/Dockerfile +++ b/dockerfiles/jdk8/centos/is/Dockerfile @@ -20,26 +20,26 @@ FROM centos:7 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" - -#Install Open JDK 8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +# Instal JDK Dependencies RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ && yum clean all ENV JAVA_VERSION jdk8u322-b06 +# Install JDK8 RUN set -eux; \ ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ - case "${ARCH}" in \ - amd64|i386:x86-64) \ - ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + case "${ARCH}" in \ + amd64|i386:x86-64) \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.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 -; \ @@ -77,7 +77,6 @@ This Docker container comprises of a WSO2 product, running with its latest GA re which is under the Apache License, Version 2.0. \n\ Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' - # create the non-root user and group and set MOTD login message RUN \ groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ @@ -128,5 +127,4 @@ ENV WORKING_DIRECTORY=${USER_HOME} \ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] -© 2022 GitHub, Inc. +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file diff --git a/dockerfiles/jdk8/ubuntu/is/Dockerfile b/dockerfiles/jdk8/ubuntu/is/Dockerfile index d56dcdf7..3cbc3770 100755 --- a/dockerfiles/jdk8/ubuntu/is/Dockerfile +++ b/dockerfiles/jdk8/ubuntu/is/Dockerfile @@ -16,33 +16,35 @@ # # ------------------------------------------------------------------------ -# set base Docker image to JDK Ubuntu 20.04 Docker image +# set base Docker image to Ubuntu 20.04 Docker image FROM ubuntu:20.04 + LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.10" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" -#Install Open JDK ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +#Install JDK Dependencies 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/* + && 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 jdk8u292-b10 +ENV JAVA_VERSION jdk8u322-b06 +#Install JDK8 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ - amd64|x86_64) \ - ESUM='699981083983b60a7eeb511ad640fae3ae4b879de5a3980fe837e8ade9c34a08'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz'; \ - ;; \ + amd64|x86_64) \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ + ;; \ *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ @@ -71,6 +73,7 @@ ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/relea # build arguments for external artifacts ARG DNS_JAVA_VERSION=2.1.8 ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 +ARG MYSQL_CONNECTOR_VERSION=8.0.17 # build argument for MOTD ARG MOTD="\n\ Welcome to WSO2 Docker resources.\n\ @@ -85,6 +88,14 @@ RUN \ && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ && echo '[ ! -z "${TERM}" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc; echo "${MOTD}" > /etc/motd +# create Java prefs dir +# this is to avoid warning logs printed by FileSystemPreferences class +RUN \ + mkdir -p ${USER_HOME}/.java/.systemPrefs \ + && mkdir -p ${USER_HOME}/.java/.userPrefs \ + && chmod -R 755 ${USER_HOME}/.java \ + && chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java + # copy init script to user home COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ @@ -107,17 +118,20 @@ RUN \ # add libraries for Kubernetes membership scheme based clustering ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins +# add MySQL JDBC connector to server home as a third party library +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ # set the user and work directory USER ${USER_ID} WORKDIR ${USER_HOME} # set environment variables -ENV WORKING_DIRECTORY=${USER_HOME} \ +ENV JAVA_OPTS="-Djava.util.prefs.systemRoot=${USER_HOME}/.java -Djava.util.prefs.userRoot=${USER_HOME}/.java/.userPrefs" \ + WORKING_DIRECTORY=${USER_HOME} \ WSO2_SERVER_HOME=${WSO2_SERVER_HOME} # expose ports EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file diff --git a/dockerfiles/ubuntu/is/Dockerfile b/dockerfiles/ubuntu/is/Dockerfile index 892dc6e3..82b9655d 100755 --- a/dockerfiles/ubuntu/is/Dockerfile +++ b/dockerfiles/ubuntu/is/Dockerfile @@ -20,10 +20,9 @@ FROM ubuntu:20.04 LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" - -#Install Open JDK 8 +#Install JDK Dependencies ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update \ @@ -32,19 +31,20 @@ RUN apt-get update \ && locale-gen en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* -ENV JAVA_VERSION jdk8u322-b06 +ENV JAVA_VERSION jdk-11.0.13+8 +#Install JDK11 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ - amd64|x86_64) \ - ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ - ;; \ + amd64|x86_64) \ + ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz'; \ + ;; \ *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ From 9298958183044d115353d2ae92a5bc7ab63feef8 Mon Sep 17 00:00:00 2001 From: Gershom Seneviratne Date: Tue, 8 Mar 2022 10:57:41 +0530 Subject: [PATCH 3/3] Changed dockerfiles to use adoptium JDK for CentOS 7, Alpine 3.15 and Ubuntu 20.04 --- CHANGELOG.md | 4 +-- dockerfiles/alpine/is/Dockerfile | 42 ++++++++++++------------ dockerfiles/centos/is/Dockerfile | 21 ++++++------ dockerfiles/jdk8/alpine/is/Dockerfile | 38 ++++++++++------------ dockerfiles/jdk8/centos/is/Dockerfile | 24 +++++++------- dockerfiles/jdk8/ubuntu/is/Dockerfile | 46 +++++++++++++++++---------- dockerfiles/ubuntu/is/Dockerfile | 24 +++++++------- 7 files changed, 103 insertions(+), 96 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e41abeb..6dee3abe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,10 @@ in each resource release, will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [v5.11.0.11] - 2022-03-07 +## [v5.11.0.11] - 2022-03-08 ### Changed -- Changed base image of dockerfiles to an OS image and installed relevant jdk on it, instead of directly using a JDK pre installed base image. +- Changed base image of dockerfiles to an OS image and installed relevant JDK on it, instead of using a JDK installed OS image. ## [v5.11.0.9] - 2022-01-20 diff --git a/dockerfiles/alpine/is/Dockerfile b/dockerfiles/alpine/is/Dockerfile index 80d35bd0..d10ae4ee 100755 --- a/dockerfiles/alpine/is/Dockerfile +++ b/dockerfiles/alpine/is/Dockerfile @@ -21,39 +21,37 @@ FROM alpine:3.15.0 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" -#Install Open JDK = ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' -# install JDK Dependencies +# Install JDK Dependencies RUN apk add --no-cache tzdata musl-locales musl-locales-lang \ && rm -rf /var/cache/apk/* - ENV JAVA_VERSION jdk-11.0.14+9 - -#Install JDK11 +# Install JDK11 RUN set -eux; \ apk add --no-cache --virtual .fetch-deps curl; \ ARCH="$(apk --print-arch)"; \ case "${ARCH}" in \ - amd64|x86_64) \ - ESUM='f94a01258a5496eda9e3de6807e6ecfe08a5ad4a2d42e4332a77f74174706f5c'; \ - BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.14_9.tar.gz'; ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + amd64|x86_64) \ + ESUM='f94a01258a5496eda9e3de6807e6ecfe08a5ad4a2d42e4332a77f74174706f5c'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_alpine-linux_hotspot_11.0.14_9.tar.gz'; \ + ;; \ + *) \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ - wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p /opt/java/openjdk; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory /opt/java/openjdk \ - --strip-components 1 \ - --no-same-owner \ - ; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory /opt/java/openjdk \ + --strip-components 1 \ + --no-same-owner \ + ; \ rm -rf /tmp/openjdk.tar.gz; ENV JAVA_HOME=/opt/java/openjdk \ @@ -134,4 +132,4 @@ ENV WORKING_DIRECTORY=${USER_HOME} \ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/centos/is/Dockerfile b/dockerfiles/centos/is/Dockerfile index 2be80184..e9367a02 100755 --- a/dockerfiles/centos/is/Dockerfile +++ b/dockerfiles/centos/is/Dockerfile @@ -21,25 +21,26 @@ FROM centos:7 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" -#Install Open JDK 11 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +# Install JDK Dependencies RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ && yum clean all ENV JAVA_VERSION jdk-11.0.13+8 +# Install JDK11 RUN set -eux; \ ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ case "${ARCH}" in \ - amd64|i386:x86-64) \ - ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ - BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + amd64|i386:x86-64) \ + ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.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 -; \ @@ -127,4 +128,4 @@ ENV WORKING_DIRECTORY=${USER_HOME} \ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/jdk8/alpine/is/Dockerfile b/dockerfiles/jdk8/alpine/is/Dockerfile index 28d1b494..527db620 100755 --- a/dockerfiles/jdk8/alpine/is/Dockerfile +++ b/dockerfiles/jdk8/alpine/is/Dockerfile @@ -20,15 +20,12 @@ FROM alpine:3.15.0 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" - -#Install Open JDK 8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' -# install JDK Dependencies +# Install JDK Dependencies RUN apk add --no-cache tzdata musl-locales musl-locales-lang \ && rm -rf /var/cache/apk/* - ENV JAVA_VERSION jdk8u322-b06 RUN apk --no-progress --purge --no-cache upgrade \ @@ -40,7 +37,6 @@ RUN apk --no-progress --purge --no-cache upgrade \ && rm -vrf /var/cache/apk/* \ && curl --version -# Install vanilla GLibC: https://github.com/sgerrand/alpine-pkg-glibc RUN curl -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ && curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \ && apk add glibc-2.32-r0.apk @@ -51,23 +47,23 @@ RUN set -eux; \ ARCH="$(apk --print-arch)"; \ case "${ARCH}" in \ amd64|x86_64) \ - ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ - ;; \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ + ;; \ *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ - wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ - echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ - mkdir -p /opt/java/openjdk; \ - tar --extract \ - --file /tmp/openjdk.tar.gz \ - --directory /opt/java/openjdk \ - --strip-components 1 \ - --no-same-owner \ - ; \ + wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \ + echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ + mkdir -p /opt/java/openjdk; \ + tar --extract \ + --file /tmp/openjdk.tar.gz \ + --directory /opt/java/openjdk \ + --strip-components 1 \ + --no-same-owner \ + ; \ rm -rf /tmp/openjdk.tar.gz; ENV JAVA_HOME=/opt/java/openjdk \ @@ -149,4 +145,4 @@ ENV WORKING_DIRECTORY=${USER_HOME} \ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] diff --git a/dockerfiles/jdk8/centos/is/Dockerfile b/dockerfiles/jdk8/centos/is/Dockerfile index e626b660..d89edacf 100755 --- a/dockerfiles/jdk8/centos/is/Dockerfile +++ b/dockerfiles/jdk8/centos/is/Dockerfile @@ -20,26 +20,26 @@ FROM centos:7 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" - -#Install Open JDK 8 ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +# Instal JDK Dependencies RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \ && yum clean all ENV JAVA_VERSION jdk8u322-b06 +# Install JDK8 RUN set -eux; \ ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \ - case "${ARCH}" in \ - amd64|i386:x86-64) \ - ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ - ;; \ - *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + case "${ARCH}" in \ + amd64|i386:x86-64) \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.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 -; \ @@ -77,7 +77,6 @@ This Docker container comprises of a WSO2 product, running with its latest GA re which is under the Apache License, Version 2.0. \n\ Read more about Apache License, Version 2.0 here @ http://www.apache.org/licenses/LICENSE-2.0.\n"' - # create the non-root user and group and set MOTD login message RUN \ groupadd --system -g ${USER_GROUP_ID} ${USER_GROUP} \ @@ -129,4 +128,3 @@ EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] -© 2022 GitHub, Inc. diff --git a/dockerfiles/jdk8/ubuntu/is/Dockerfile b/dockerfiles/jdk8/ubuntu/is/Dockerfile index d56dcdf7..38892f56 100755 --- a/dockerfiles/jdk8/ubuntu/is/Dockerfile +++ b/dockerfiles/jdk8/ubuntu/is/Dockerfile @@ -16,33 +16,35 @@ # # ------------------------------------------------------------------------ -# set base Docker image to JDK Ubuntu 20.04 Docker image +# set base Docker image to Ubuntu 20.04 Docker image FROM ubuntu:20.04 + LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.10" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" -#Install Open JDK ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' +#Install JDK Dependencies 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/* + && 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 jdk8u292-b10 +ENV JAVA_VERSION jdk8u322-b06 +#Install JDK8 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ - amd64|x86_64) \ - ESUM='699981083983b60a7eeb511ad640fae3ae4b879de5a3980fe837e8ade9c34a08'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u312-b07/OpenJDK8U-jdk_x64_linux_hotspot_8u312b07.tar.gz'; \ - ;; \ + amd64|x86_64) \ + ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ + BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ + ;; \ *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ @@ -71,6 +73,7 @@ ARG WSO2_SERVER_DIST_URL=https://github.com/wso2/${WSO2_SERVER_REPOSITORY}/relea # build arguments for external artifacts ARG DNS_JAVA_VERSION=2.1.8 ARG K8S_MEMBERSHIP_SCHEME_VERSION=1.0.8 +ARG MYSQL_CONNECTOR_VERSION=8.0.17 # build argument for MOTD ARG MOTD="\n\ Welcome to WSO2 Docker resources.\n\ @@ -85,6 +88,14 @@ RUN \ && useradd --system --create-home --home-dir ${USER_HOME} --no-log-init -g ${USER_GROUP_ID} -u ${USER_ID} ${USER} \ && echo '[ ! -z "${TERM}" -a -r /etc/motd ] && cat /etc/motd' >> /etc/bash.bashrc; echo "${MOTD}" > /etc/motd +# create Java prefs dir +# this is to avoid warning logs printed by FileSystemPreferences class +RUN \ + mkdir -p ${USER_HOME}/.java/.systemPrefs \ + && mkdir -p ${USER_HOME}/.java/.userPrefs \ + && chmod -R 755 ${USER_HOME}/.java \ + && chown -R ${USER}:${USER_GROUP} ${USER_HOME}/.java + # copy init script to user home COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/ @@ -107,13 +118,16 @@ RUN \ # add libraries for Kubernetes membership scheme based clustering ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/dnsjava/dnsjava/${DNS_JAVA_VERSION}/dnsjava-${DNS_JAVA_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/lib ADD --chown=wso2carbon:wso2 http://maven.wso2.org/nexus/content/repositories/releases/org/wso2/carbon/kubernetes/artifacts/kubernetes-membership-scheme/${K8S_MEMBERSHIP_SCHEME_VERSION}/kubernetes-membership-scheme-${K8S_MEMBERSHIP_SCHEME_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins +# add MySQL JDBC connector to server home as a third party library +ADD --chown=wso2carbon:wso2 https://repo1.maven.org/maven2/mysql/mysql-connector-java/${MYSQL_CONNECTOR_VERSION}/mysql-connector-java-${MYSQL_CONNECTOR_VERSION}.jar ${WSO2_SERVER_HOME}/repository/components/dropins/ # set the user and work directory USER ${USER_ID} WORKDIR ${USER_HOME} # set environment variables -ENV WORKING_DIRECTORY=${USER_HOME} \ +ENV JAVA_OPTS="-Djava.util.prefs.systemRoot=${USER_HOME}/.java -Djava.util.prefs.userRoot=${USER_HOME}/.java/.userPrefs" \ + WORKING_DIRECTORY=${USER_HOME} \ WSO2_SERVER_HOME=${WSO2_SERVER_HOME} # expose ports diff --git a/dockerfiles/ubuntu/is/Dockerfile b/dockerfiles/ubuntu/is/Dockerfile index 892dc6e3..c64f019e 100755 --- a/dockerfiles/ubuntu/is/Dockerfile +++ b/dockerfiles/ubuntu/is/Dockerfile @@ -20,10 +20,9 @@ FROM ubuntu:20.04 LABEL maintainer="WSO2 Docker Maintainers " \ - com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.11" + com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.11.0.8" - -#Install Open JDK 8 +#Install JDK Dependencies ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' RUN apt-get update \ @@ -32,19 +31,20 @@ RUN apt-get update \ && locale-gen en_US.UTF-8 \ && rm -rf /var/lib/apt/lists/* -ENV JAVA_VERSION jdk8u322-b06 +ENV JAVA_VERSION jdk-11.0.13+8 +#Install JDK11 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ - amd64|x86_64) \ - ESUM='3d62362a78c9412766471b05253507a4cfc212daea5cdf122860173ce902400e'; \ - BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_x64_linux_hotspot_8u322b06.tar.gz'; \ - ;; \ + amd64|x86_64) \ + ESUM='3b1c0c34be4c894e64135a454f2d5aaa4bd10aea04ec2fa0c0efe6bb26528e30'; \ + BINARY_URL='https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.13%2B8/OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz'; \ + ;; \ *) \ - echo "Unsupported arch: ${ARCH}"; \ - exit 1; \ - ;; \ + echo "Unsupported arch: ${ARCH}"; \ + exit 1; \ + ;; \ esac; \ curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \ echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \ @@ -134,4 +134,4 @@ ENV JAVA_OPTS="-Djava.util.prefs.systemRoot=${USER_HOME}/.java -Djava.util.prefs EXPOSE 4000 9763 9443 # initiate container and start WSO2 Carbon server -ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/home/wso2carbon/docker-entrypoint.sh"]