Skip to content

Commit c5f2936

Browse files
Merge pull request #379 from Yoshani/5.8.x
[5.8] Modified centos dockerfiles to have OS based base image and upgraded JDK 8
2 parents 0d24dec + 71928d0 commit c5f2936

File tree

11 files changed

+195
-67
lines changed

11 files changed

+195
-67
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ All notable changes to this project 5.8.x per each release will be documented in
33

44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55

6+
## [v5.8.0.10] - 2023-02-01
7+
8+
### Changed
9+
- Modified centos dockerfiles to have OS based base image and upgraded JDK 8 version in all dockerfiles.
10+
611
## [v5.8.0.9] - 2022-04-28
712

813
### Changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ Docker Compose files have been created according to the most common IAM deployme
1414
to quickly evaluate product features along side their co-operate IAM requirements. The Compose files make use of per profile
1515
Docker images of WSO2 Identity Server and Analytics and MySQL.
1616

17-
**Change log** from previous v5.8.0.3 release: [View Here](CHANGELOG.md)
17+
**Change log** from previous v5.8.0.9 release: [View Here](CHANGELOG.md)

dockerfiles/alpine/is-analytics/dashboard/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
# ------------------------------------------------------------------------
1818

1919
# set base Docker image to AdoptOpenJDK Alpine Docker image
20-
FROM adoptopenjdk/openjdk8:jdk8u302-b08-alpine
20+
FROM adoptopenjdk/openjdk8:jdk8u362-b09-alpine
2121
LABEL maintainer="WSO2 Docker Maintainers <[email protected]>" \
22-
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.7"
22+
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.10"
2323

2424
# set Docker image build arguments
2525
# build arguments for user/group configurations

dockerfiles/alpine/is-analytics/worker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
# ------------------------------------------------------------------------
1818

1919
# set base Docker image to AdoptOpenJDK Alpine Docker image
20-
FROM adoptopenjdk/openjdk8:jdk8u302-b08-alpine
20+
FROM adoptopenjdk/openjdk8:jdk8u362-b09-alpine
2121
LABEL maintainer="WSO2 Docker Maintainers <[email protected]>" \
22-
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.7"
22+
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.10"
2323

2424
# set Docker image build arguments
2525
# build arguments for user/group configurations

dockerfiles/alpine/is/Dockerfile

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,58 @@
1616
#
1717
# ------------------------------------------------------------------------
1818

19-
# set base Docker image to AdoptOpenJDK Alpine Docker image
20-
FROM adoptopenjdk/openjdk8:jdk8u212-b03-alpine
19+
# Set base Docker image to Alpine Docker image.
20+
FROM alpine:3.15.0
2121
LABEL maintainer="WSO2 Docker Maintainers <[email protected]>" \
22-
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.6"
22+
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.10"
23+
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
24+
25+
# Install JDK Dependencies.
26+
RUN apk add --no-cache tzdata musl-locales musl-locales-lang \
27+
&& rm -rf /var/cache/apk/*
28+
29+
ENV JAVA_VERSION jdk8u362-b09
30+
31+
RUN apk --no-progress --purge --no-cache upgrade \
32+
&& apk --no-progress --purge --no-cache add --upgrade \
33+
curl \
34+
wget \
35+
openssh \
36+
&& apk --no-progress --purge --no-cache upgrade \
37+
&& rm -vrf /var/cache/apk/* \
38+
&& curl --version
39+
40+
RUN curl -o /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
41+
&& curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.32-r0/glibc-2.32-r0.apk \
42+
&& apk add glibc-2.32-r0.apk
43+
44+
#Install JDK8.
45+
RUN set -eux; \
46+
apk add --no-cache --virtual .fetch-deps curl; \
47+
ARCH="$(apk --print-arch)"; \
48+
case "${ARCH}" in \
49+
amd64|x86_64) \
50+
ESUM='389c0d2ea59742103f46f1dd6d2c83e43e9f935f3f0485b1f9e74ac4e8c5ce47'; \
51+
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u362-b09/OpenJDK8U-jdk_x64_alpine-linux_hotspot_8u362b09.tar.gz'; \
52+
;; \
53+
*) \
54+
echo "Unsupported arch: ${ARCH}"; \
55+
exit 1; \
56+
;; \
57+
esac; \
58+
wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \
59+
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
60+
mkdir -p /opt/java/openjdk; \
61+
tar --extract \
62+
--file /tmp/openjdk.tar.gz \
63+
--directory /opt/java/openjdk \
64+
--strip-components 1 \
65+
--no-same-owner \
66+
; \
67+
rm -rf /tmp/openjdk.tar.gz;
68+
69+
ENV JAVA_HOME=/opt/java/openjdk \
70+
PATH="/opt/java/openjdk/bin:$PATH" ENV=${USER_HOME}"/.ashrc"
2371

2472
# set Docker image build arguments
2573
# build arguments for user/group configurations
@@ -31,6 +79,7 @@ ARG USER_HOME=/home/${USER}
3179
# build arguments for WSO2 product installation
3280
ARG WSO2_SERVER_NAME=wso2is
3381
ARG WSO2_SERVER_VERSION=5.8.0
82+
ARG WSO2_SERVER_REPOSITORY=product-is
3483
ARG WSO2_SERVER=${WSO2_SERVER_NAME}-${WSO2_SERVER_VERSION}
3584
ARG WSO2_SERVER_HOME=${USER_HOME}/${WSO2_SERVER}
3685
ARG WSO2_SERVER_DIST_URL=https://bintray.com/wso2/binaryGA/download_file?file_path=${WSO2_SERVER}.zip
@@ -63,14 +112,21 @@ RUN \
63112

64113
# copy init script to user home
65114
COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/
115+
66116
# install required packages
67-
RUN apk add --no-cache netcat-openbsd
117+
RUN \
118+
apk update \
119+
&& apk add --no-cache netcat-openbsd \
120+
&& apk add unzip \
121+
&& apk add wget
122+
68123
# add the WSO2 product distribution to user's home directory
69124
RUN \
70125
wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \
71126
&& unzip -d ${USER_HOME} ${WSO2_SERVER}.zip \
72127
&& chown wso2carbon:wso2 -R ${WSO2_SERVER_HOME} \
73128
&& rm -f ${WSO2_SERVER}.zip
129+
74130
# add libraries for Kubernetes membership scheme based clustering
75131
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
76132
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/

dockerfiles/centos/is-analytics/dashboard/Dockerfile

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,40 @@
1616
#
1717
# ------------------------------------------------------------------------
1818

19-
# set base Docker image to latest CentOS Docker image
19+
# Set base Docker image to CentOS Docker image.
2020
FROM centos:7
2121
LABEL maintainer="WSO2 Docker Maintainers <[email protected]>" \
22-
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.9"
22+
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.10"
23+
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
24+
25+
# Install JDK Dependencies.
26+
RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \
27+
&& yum clean all
28+
29+
ENV JAVA_VERSION jdk8u362-b09
30+
31+
# Install JDK8.
32+
RUN set -eux; \
33+
ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \
34+
case "${ARCH}" in \
35+
amd64|i386:x86-64) \
36+
ESUM='1486a792fb224611ce0cd0e83d4aacd3503b56698549f8e9a9f0a6ebb83bdba1'; \
37+
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u362-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz'; \
38+
;; \
39+
*) \
40+
echo "Unsupported arch: ${ARCH}"; \
41+
exit 1; \
42+
;; \
43+
esac; \
44+
curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \
45+
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
46+
mkdir -p /opt/java/openjdk; \
47+
cd /opt/java/openjdk; \
48+
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
49+
rm -rf /tmp/openjdk.tar.gz;
50+
51+
ENV JAVA_HOME=/opt/java/openjdk \
52+
PATH="/opt/java/openjdk/bin:$PATH"
2353

2454
# set Docker image build arguments
2555
# build arguments for user/group configurations
@@ -28,8 +58,6 @@ ARG USER_ID=802
2858
ARG USER_GROUP=wso2
2959
ARG USER_GROUP_ID=802
3060
ARG USER_HOME=/home/${USER}
31-
# set JDK configurations
32-
ARG JAVA_HOME=${USER_HOME}/java
3361
# build arguments for WSO2 product installation
3462
ARG WSO2_SERVER_NAME=wso2is-analytics
3563
ARG WSO2_SERVER_VERSION=5.8.0
@@ -54,6 +82,7 @@ RUN \
5482

5583
# copy init script to user home
5684
COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/
85+
5786
# install required packages
5887
RUN \
5988
yum -y update \
@@ -62,14 +91,7 @@ RUN \
6291
unzip \
6392
wget \
6493
&& rm -rf /var/cache/yum/*
65-
# install AdoptOpenJDK HotSpot
66-
RUN \
67-
mkdir -p ${JAVA_HOME} \
68-
&& wget -O OpenJDK8U-jdk_x64_linux_hotspot.tar.gz https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u212-b03/OpenJDK8U-jdk_x64_linux_hotspot_8u212b03.tar.gz \
69-
&& echo "dd28d6d2cde2b931caf94ac2422a2ad082ea62f0beee3bf7057317c53093de93 OpenJDK8U-jdk_x64_linux_hotspot.tar.gz" | sha256sum -c - \
70-
&& tar -xf OpenJDK8U-jdk_x64_linux_hotspot.tar.gz -C ${JAVA_HOME} --strip-components=1 \
71-
&& chown wso2carbon:wso2 -R ${JAVA_HOME} \
72-
&& rm -f OpenJDK8U-jdk_x64_linux_hotspot.tar.gz
94+
7395
# add the WSO2 product distribution to user's home directory
7496
RUN \
7597
wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \
@@ -84,9 +106,7 @@ USER ${USER_ID}
84106
WORKDIR ${USER_HOME}
85107

86108
# set environment variables
87-
ENV JAVA_HOME=${JAVA_HOME} \
88-
PATH=${JAVA_HOME}/bin:${PATH} \
89-
WORKING_DIRECTORY=${USER_HOME} \
109+
ENV WORKING_DIRECTORY=${USER_HOME} \
90110
WSO2_SERVER_HOME=${WSO2_SERVER_HOME}
91111

92112
# expose ports

dockerfiles/centos/is-analytics/worker/Dockerfile

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,40 @@
1616
#
1717
# ------------------------------------------------------------------------
1818

19-
# set base Docker image to latest CentOS Docker image
19+
# Set base Docker image to CentOS Docker image.
2020
FROM centos:7
2121
LABEL maintainer="WSO2 Docker Maintainers <[email protected]>" \
22-
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.9"
22+
com.wso2.docker.source="https://github.com/wso2/docker-is/releases/tag/v5.8.0.10"
23+
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
24+
25+
# Install JDK Dependencies.
26+
RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \
27+
&& yum clean all
28+
29+
ENV JAVA_VERSION jdk8u362-b09
30+
31+
# Install JDK8.
32+
RUN set -eux; \
33+
ARCH="$(objdump="$(command -v objdump)" && objdump --file-headers "$objdump" | awk -F '[:,]+[[:space:]]+' '$1 == "architecture" { print $2 }')"; \
34+
case "${ARCH}" in \
35+
amd64|i386:x86-64) \
36+
ESUM='1486a792fb224611ce0cd0e83d4aacd3503b56698549f8e9a9f0a6ebb83bdba1'; \
37+
BINARY_URL='https://github.com/adoptium/temurin8-binaries/releases/download/jdk8u362-b09/OpenJDK8U-jdk_x64_linux_hotspot_8u362b09.tar.gz'; \
38+
;; \
39+
*) \
40+
echo "Unsupported arch: ${ARCH}"; \
41+
exit 1; \
42+
;; \
43+
esac; \
44+
curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \
45+
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
46+
mkdir -p /opt/java/openjdk; \
47+
cd /opt/java/openjdk; \
48+
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
49+
rm -rf /tmp/openjdk.tar.gz;
50+
51+
ENV JAVA_HOME=/opt/java/openjdk \
52+
PATH="/opt/java/openjdk/bin:$PATH"
2353

2454
# set Docker image build arguments
2555
# build arguments for user/group configurations
@@ -28,8 +58,6 @@ ARG USER_ID=802
2858
ARG USER_GROUP=wso2
2959
ARG USER_GROUP_ID=802
3060
ARG USER_HOME=/home/${USER}
31-
# set JDK configurations
32-
ARG JAVA_HOME=${USER_HOME}/java
3361
# build arguments for WSO2 product installation
3462
ARG WSO2_SERVER_NAME=wso2is-analytics
3563
ARG WSO2_SERVER_VERSION=5.8.0
@@ -54,6 +82,7 @@ RUN \
5482

5583
# copy init script to user home
5684
COPY --chown=wso2carbon:wso2 docker-entrypoint.sh ${USER_HOME}/
85+
5786
# install required packages
5887
RUN \
5988
yum -y update \
@@ -62,14 +91,7 @@ RUN \
6291
unzip \
6392
wget \
6493
&& rm -rf /var/cache/yum/*
65-
# install AdoptOpenJDK HotSpot
66-
RUN \
67-
mkdir -p ${JAVA_HOME} \
68-
&& wget -O OpenJDK8U-jdk_x64_linux_hotspot.tar.gz https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u212-b03/OpenJDK8U-jdk_x64_linux_hotspot_8u212b03.tar.gz \
69-
&& echo "dd28d6d2cde2b931caf94ac2422a2ad082ea62f0beee3bf7057317c53093de93 OpenJDK8U-jdk_x64_linux_hotspot.tar.gz" | sha256sum -c - \
70-
&& tar -xf OpenJDK8U-jdk_x64_linux_hotspot.tar.gz -C ${JAVA_HOME} --strip-components=1 \
71-
&& chown wso2carbon:wso2 -R ${JAVA_HOME} \
72-
&& rm -f OpenJDK8U-jdk_x64_linux_hotspot.tar.gz
94+
7395
# add the WSO2 product distribution to user's home directory
7496
RUN \
7597
wget -O ${WSO2_SERVER}.zip "${WSO2_SERVER_DIST_URL}" \
@@ -84,9 +106,7 @@ USER ${USER_ID}
84106
WORKDIR ${USER_HOME}
85107

86108
# set environment variables
87-
ENV JAVA_HOME=${JAVA_HOME} \
88-
PATH=${JAVA_HOME}/bin:${PATH} \
89-
WORKING_DIRECTORY=${USER_HOME} \
109+
ENV WORKING_DIRECTORY=${USER_HOME} \
90110
WSO2_SERVER_HOME=${WSO2_SERVER_HOME}
91111

92112
# expose ports

0 commit comments

Comments
 (0)