From 3bf48f5ceb029738655493d3acc5bfa07fde655d Mon Sep 17 00:00:00 2001 From: Tharika Madurapperuma Date: Fri, 17 Dec 2021 15:51:26 +0530 Subject: [PATCH 1/2] Add OpenJDK11U-jdk_x64_linux_hotspot_11.0.13_8.tar.gz to the Ubuntu --- .../apim-analytics/dashboard/Dockerfile | 53 ++++++++++++++++++- .../ubuntu/apim-analytics/worker/Dockerfile | 53 ++++++++++++++++++- dockerfiles/ubuntu/apim/Dockerfile | 53 ++++++++++++++++++- 3 files changed, 153 insertions(+), 6 deletions(-) diff --git a/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile b/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile index f9a6d3ea..0b1689d3 100755 --- a/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile +++ b/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile @@ -16,11 +16,60 @@ # # ------------------------------------------------------------------------ -# set base Docker image to AdoptOpenJDK Ubuntu Docker image -FROM adoptopenjdk:11.0.10_9-jdk-hotspot-focal +# set base Docker image to JDK Ubuntu 20.04 Docker image +FROM ubuntu:20.04 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v3.2.0.3" +#Install Open JDK +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-11.0.13+8 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='4966b0df9406b7041e14316e04c9579806832fafa02c5d3bd1842163b7f2353a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='2d7aba0b9ea287145ad437d4b3035fc84f7508e78c6fec99be4ff59fe1b6fc0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_arm_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='945b114bd0a617d742653ac1ae89d35384bf89389046a44681109cf8e4f4af91'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + s390x) \ + ESUM='5d81979d27d9d8b3ed5bca1a91fc899cbbfb3d907f445ee7329628105e92f52c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.11_9.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; \ + ;; \ + 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 ARG USER=wso2carbon diff --git a/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile b/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile index e3ad80b3..e8465bc0 100755 --- a/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile +++ b/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile @@ -16,11 +16,60 @@ # # ------------------------------------------------------------------------ -# set base Docker image to AdoptOpenJDK Ubuntu Docker image -FROM adoptopenjdk:11.0.10_9-jdk-hotspot-focal +# set base Docker image to JDK Ubuntu 20.04 Docker image +FROM ubuntu:20.04 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v3.2.0.3" +#Install Open JDK +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-11.0.13+8 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='4966b0df9406b7041e14316e04c9579806832fafa02c5d3bd1842163b7f2353a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='2d7aba0b9ea287145ad437d4b3035fc84f7508e78c6fec99be4ff59fe1b6fc0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_arm_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='945b114bd0a617d742653ac1ae89d35384bf89389046a44681109cf8e4f4af91'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + s390x) \ + ESUM='5d81979d27d9d8b3ed5bca1a91fc899cbbfb3d907f445ee7329628105e92f52c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.11_9.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; \ + ;; \ + 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 ARG USER=wso2carbon diff --git a/dockerfiles/ubuntu/apim/Dockerfile b/dockerfiles/ubuntu/apim/Dockerfile index 36d7de6b..d0a533f7 100755 --- a/dockerfiles/ubuntu/apim/Dockerfile +++ b/dockerfiles/ubuntu/apim/Dockerfile @@ -16,11 +16,60 @@ # # ------------------------------------------------------------------------ -# set base Docker image to AdoptOpenJDK Ubuntu Docker image -FROM adoptopenjdk:11.0.10_9-jdk-hotspot-focal +# set base Docker image to JDK Ubuntu 20.04 Docker image +FROM ubuntu:20.04 LABEL maintainer="WSO2 Docker Maintainers " \ com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v3.2.0.3" +#Install Open JDK +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-11.0.13+8 + +RUN set -eux; \ + ARCH="$(dpkg --print-architecture)"; \ + case "${ARCH}" in \ + aarch64|arm64) \ + ESUM='4966b0df9406b7041e14316e04c9579806832fafa02c5d3bd1842163b7f2353a'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + armhf|armv7l) \ + ESUM='2d7aba0b9ea287145ad437d4b3035fc84f7508e78c6fec99be4ff59fe1b6fc0d'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_arm_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + ppc64el|ppc64le) \ + ESUM='945b114bd0a617d742653ac1ae89d35384bf89389046a44681109cf8e4f4af91'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.11_9.tar.gz'; \ + ;; \ + s390x) \ + ESUM='5d81979d27d9d8b3ed5bca1a91fc899cbbfb3d907f445ee7329628105e92f52c'; \ + BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.11_9.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; \ + ;; \ + 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 ARG USER=wso2carbon From 2d0a6e014288c0b826cc01fd71474056393293da Mon Sep 17 00:00:00 2001 From: Tharika Madurapperuma Date: Tue, 21 Dec 2021 16:58:06 +0530 Subject: [PATCH 2/2] Change jdk --- .../ubuntu/apim-analytics/dashboard/Dockerfile | 16 ---------------- .../ubuntu/apim-analytics/worker/Dockerfile | 16 ---------------- dockerfiles/ubuntu/apim/Dockerfile | 16 ---------------- 3 files changed, 48 deletions(-) diff --git a/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile b/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile index 0b1689d3..be9c8306 100755 --- a/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile +++ b/dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile @@ -35,22 +35,6 @@ ENV JAVA_VERSION jdk-11.0.13+8 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ - aarch64|arm64) \ - ESUM='4966b0df9406b7041e14316e04c9579806832fafa02c5d3bd1842163b7f2353a'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - armhf|armv7l) \ - ESUM='2d7aba0b9ea287145ad437d4b3035fc84f7508e78c6fec99be4ff59fe1b6fc0d'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_arm_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - ppc64el|ppc64le) \ - ESUM='945b114bd0a617d742653ac1ae89d35384bf89389046a44681109cf8e4f4af91'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - s390x) \ - ESUM='5d81979d27d9d8b3ed5bca1a91fc899cbbfb3d907f445ee7329628105e92f52c'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.11_9.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'; \ diff --git a/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile b/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile index e8465bc0..83938b43 100755 --- a/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile +++ b/dockerfiles/ubuntu/apim-analytics/worker/Dockerfile @@ -35,22 +35,6 @@ ENV JAVA_VERSION jdk-11.0.13+8 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ - aarch64|arm64) \ - ESUM='4966b0df9406b7041e14316e04c9579806832fafa02c5d3bd1842163b7f2353a'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - armhf|armv7l) \ - ESUM='2d7aba0b9ea287145ad437d4b3035fc84f7508e78c6fec99be4ff59fe1b6fc0d'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_arm_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - ppc64el|ppc64le) \ - ESUM='945b114bd0a617d742653ac1ae89d35384bf89389046a44681109cf8e4f4af91'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - s390x) \ - ESUM='5d81979d27d9d8b3ed5bca1a91fc899cbbfb3d907f445ee7329628105e92f52c'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.11_9.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'; \ diff --git a/dockerfiles/ubuntu/apim/Dockerfile b/dockerfiles/ubuntu/apim/Dockerfile index d0a533f7..aa0b797e 100755 --- a/dockerfiles/ubuntu/apim/Dockerfile +++ b/dockerfiles/ubuntu/apim/Dockerfile @@ -35,22 +35,6 @@ ENV JAVA_VERSION jdk-11.0.13+8 RUN set -eux; \ ARCH="$(dpkg --print-architecture)"; \ case "${ARCH}" in \ - aarch64|arm64) \ - ESUM='4966b0df9406b7041e14316e04c9579806832fafa02c5d3bd1842163b7f2353a'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_aarch64_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - armhf|armv7l) \ - ESUM='2d7aba0b9ea287145ad437d4b3035fc84f7508e78c6fec99be4ff59fe1b6fc0d'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_arm_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - ppc64el|ppc64le) \ - ESUM='945b114bd0a617d742653ac1ae89d35384bf89389046a44681109cf8e4f4af91'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_ppc64le_linux_hotspot_11.0.11_9.tar.gz'; \ - ;; \ - s390x) \ - ESUM='5d81979d27d9d8b3ed5bca1a91fc899cbbfb3d907f445ee7329628105e92f52c'; \ - BINARY_URL='https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.11%2B9/OpenJDK11U-jdk_s390x_linux_hotspot_11.0.11_9.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'; \