Skip to content

Commit

Permalink
Merge pull request #432 from PasanT9/2.6.x-apim-analytics
Browse files Browse the repository at this point in the history
[APIM Analytics] [2.6.x] Modify Docker images to use base OS image and build Temurin OpenJDK
  • Loading branch information
tgtshanika authored Mar 3, 2022
2 parents c65b358 + d74d1f4 commit ebdd2d6
Show file tree
Hide file tree
Showing 6 changed files with 228 additions and 24 deletions.
20 changes: 14 additions & 6 deletions dockerfiles/alpine/apim-analytics/dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
#
# ------------------------------------------------------------------------

# set base Docker image to latest Alphine
# set base Docker image to Alpine Docker image
FROM alpine:3.15
LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.18"

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 --virtual .build-deps curl binutils zstd \
&& GLIBC_VER="2.33-r0" \
&& ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \
Expand Down Expand Up @@ -56,15 +55,15 @@ RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \
&& apk del --purge .build-deps glibc-i18n \
&& rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/*

ENV JAVA_VERSION jdk8u312-b07
ENV JAVA_VERSION=jdk8u322-b06

RUN set -eux; \
apk add --no-cache --virtual .fetch-deps curl; \
ARCH="$(apk --print-arch)"; \
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'; \
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}"; \
Expand All @@ -83,6 +82,15 @@ RUN set -eux; \
ENV JAVA_HOME=/opt/java/openjdk \
PATH="/opt/java/openjdk/bin:$PATH"

# Verify Java installation
RUN echo Verifying install ... \
&& echo javac -version && javac -version \
&& echo java -version && java -version \
&& echo Complete.

LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.19"

# set Docker image build arguments
# build arguments for user/group configurations
ARG USER=wso2carbon
Expand Down
20 changes: 14 additions & 6 deletions dockerfiles/alpine/apim-analytics/worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@
#
# ------------------------------------------------------------------------

# set base Docker image to latest Alphine
# set base Docker image to Alpine Docker image
FROM alpine:3.15
LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.18"

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 --virtual .build-deps curl binutils zstd \
&& GLIBC_VER="2.33-r0" \
&& ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \
Expand Down Expand Up @@ -56,15 +55,15 @@ RUN apk add --no-cache tzdata --virtual .build-deps curl binutils zstd \
&& apk del --purge .build-deps glibc-i18n \
&& rm -rf /tmp/*.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar.xz /var/cache/apk/*

ENV JAVA_VERSION jdk8u312-b07
ENV JAVA_VERSION=jdk8u322-b06

RUN set -eux; \
apk add --no-cache --virtual .fetch-deps curl; \
ARCH="$(apk --print-arch)"; \
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'; \
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}"; \
Expand All @@ -83,6 +82,15 @@ RUN set -eux; \
ENV JAVA_HOME=/opt/java/openjdk \
PATH="/opt/java/openjdk/bin:$PATH"

# Verify Java installation
RUN echo Verifying install ... \
&& echo javac -version && javac -version \
&& echo java -version && java -version \
&& echo Complete.

LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.19"

# set Docker image build arguments
# build arguments for user/group configurations
ARG USER=wso2carbon
Expand Down
52 changes: 49 additions & 3 deletions dockerfiles/centos/apim-analytics/dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,56 @@
#
# ------------------------------------------------------------------------

# set base Docker image to latest CentOS Docker image
FROM adoptopenjdk/openjdk8:jdk8u312-b07-centos
# set base Docker image to CentOS Docker image
FROM centos:7

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 jdk8u322-b06

# install OpenJDK 8
RUN set -eux; \
ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \
case "${ARCH}" in \
aarch64|arm64) \
ESUM='42ed3ff5a859f9015a1362fb7e650026b913d688eab471714f795651120be173'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_aarch64_linux_hotspot_8u322b06.tar.gz'; \
;; \
ppc64el|powerpc:common64) \
ESUM='c7cc9c5b237e9e1f1e3296593aba427375823592e4604fadf89a8c234c2574e1'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u322b06.tar.gz'; \
;; \
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"

# Verify Java installation
RUN echo Verifying install ... \
&& echo javac -version && javac -version \
&& echo java -version && java -version \
&& echo Complete.

LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.16"
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.17"

# set Docker image build arguments
# build arguments for user/group configurations
Expand Down
52 changes: 49 additions & 3 deletions dockerfiles/centos/apim-analytics/worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,56 @@
#
# ------------------------------------------------------------------------

# set base Docker image to latest CentOS Docker image
FROM adoptopenjdk/openjdk8:jdk8u312-b07-centos
# set base Docker image to CentOS Docker image
FROM centos:7

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 jdk8u322-b06

# install OpenJDK 8
RUN set -eux; \
ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \
case "${ARCH}" in \
aarch64|arm64) \
ESUM='42ed3ff5a859f9015a1362fb7e650026b913d688eab471714f795651120be173'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_aarch64_linux_hotspot_8u322b06.tar.gz'; \
;; \
ppc64el|powerpc:common64) \
ESUM='c7cc9c5b237e9e1f1e3296593aba427375823592e4604fadf89a8c234c2574e1'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u322b06.tar.gz'; \
;; \
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"

# Verify Java installation
RUN echo Verifying install ... \
&& echo javac -version && javac -version \
&& echo java -version && java -version \
&& echo Complete.

LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.16"
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.17"

# set Docker image build arguments
# build arguments for user/group configurations
Expand Down
54 changes: 51 additions & 3 deletions dockerfiles/ubuntu/apim-analytics/dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,58 @@
#
# ------------------------------------------------------------------------

# set base Docker image to AdoptOpenJDK Ubuntu Docker image
FROM adoptopenjdk:8u292-b10-jdk-hotspot-focal
# set base Docker image to Ubuntu Focal Docker image
FROM ubuntu:20.04

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

# install JDK Dependencies
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales python-is-python3 \
&& 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 jdk8u322-b06

RUN set -eux; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
ESUM='42ed3ff5a859f9015a1362fb7e650026b913d688eab471714f795651120be173'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_aarch64_linux_hotspot_8u322b06.tar.gz'; \
;; \
ppc64el|powerpc:common64) \
ESUM='c7cc9c5b237e9e1f1e3296593aba427375823592e4604fadf89a8c234c2574e1'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u322b06.tar.gz'; \
;; \
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"

# Verify Java installation
RUN echo Verifying install ... \
&& echo javac -version && javac -version \
&& echo java -version && java -version \
&& echo Complete.

LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.16"
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.17"

# set Docker image build arguments
# build arguments for user/group configurations
Expand Down
54 changes: 51 additions & 3 deletions dockerfiles/ubuntu/apim-analytics/worker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,58 @@
#
# ------------------------------------------------------------------------

# set base Docker image to AdoptOpenJDK Ubuntu Docker image
FROM adoptopenjdk:8u292-b10-jdk-hotspot-focal
# set base Docker image to Ubuntu Focal Docker image
FROM ubuntu:20.04

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

# install JDK Dependencies
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tzdata curl ca-certificates fontconfig locales python-is-python3 \
&& 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 jdk8u322-b06

RUN set -eux; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
ESUM='42ed3ff5a859f9015a1362fb7e650026b913d688eab471714f795651120be173'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_aarch64_linux_hotspot_8u322b06.tar.gz'; \
;; \
ppc64el|powerpc:common64) \
ESUM='c7cc9c5b237e9e1f1e3296593aba427375823592e4604fadf89a8c234c2574e1'; \
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u322-b06/OpenJDK8U-jdk_ppc64le_linux_hotspot_8u322b06.tar.gz'; \
;; \
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"

# Verify Java installation
RUN echo Verifying install ... \
&& echo javac -version && javac -version \
&& echo java -version && java -version \
&& echo Complete.

LABEL maintainer="WSO2 Docker Maintainers <dev@wso2.org>" \
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.16"
com.wso2.docker.source="https://github.com/wso2/docker-apim/releases/tag/v2.6.0.17"

# set Docker image build arguments
# build arguments for user/group configurations
Expand Down

0 comments on commit ebdd2d6

Please sign in to comment.