Skip to content

Commit 66e06e2

Browse files
authored
Merge pull request #497 from OpenLiberty/24.0.0.1-release
Updates for the release of 24.0.0.1
2 parents 12a91cd + e3693b7 commit 66e06e2

File tree

96 files changed

+3754
-63
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3754
-63
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ before_install:
1111
env:
1212
- RELEASE=../releases/23.0.0.9
1313
- RELEASE=../releases/23.0.0.12
14+
- RELEASE=../releases/24.0.0.1
1415
- RELEASE=../releases/latest
1516

1617
script:
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
FROM ibmjava:8-ubi AS getRuntime
2+
3+
USER root
4+
5+
ARG LIBERTY_VERSION=24.0.0.1
6+
ARG LIBERTY_SHA={replace_with_correct_sha}
7+
ARG LIBERTY_DOWNLOAD_URL=https://repo1.maven.org/maven2/io/openliberty/openliberty-runtime/$LIBERTY_VERSION/openliberty-runtime-$LIBERTY_VERSION.zip
8+
9+
ARG VERBOSE=false
10+
11+
# If there is a local copy of the image use that instead
12+
COPY resources/ /tmp/
13+
14+
# Install Open Liberty
15+
RUN yum -y install shadow-utils wget unzip openssl \
16+
&& if [ ! -f /tmp/wlp.zip ]; then wget -q $LIBERTY_DOWNLOAD_URL -U UA-Open-Liberty-Docker -O /tmp/wlp.zip; fi \
17+
&& echo "$LIBERTY_SHA /tmp/wlp.zip" > /tmp/wlp.zip.sha1 \
18+
&& sha1sum -c /tmp/wlp.zip.sha1 \
19+
&& chmod -R u+x /usr/bin \
20+
&& unzip -q /tmp/wlp.zip -d /opt/ol \
21+
&& mkdir -p /licenses \
22+
&& cp /opt/ol/wlp/LICENSE /licenses/ \
23+
&& adduser -u 1001 -r -g root -s /usr/sbin/nologin default \
24+
&& chown -R 1001:0 /opt/ol/wlp \
25+
&& chmod -R g+rw /opt/ol/wlp
26+
27+
FROM ibmjava:8-ubi
28+
29+
USER root
30+
31+
ARG LIBERTY_VERSION=24.0.0.1
32+
ARG LIBERTY_BUILD_LABEL={replace_with_gm_driver_label}
33+
34+
ARG OPENJ9_SCC=true
35+
ARG VERBOSE=false
36+
37+
LABEL org.opencontainers.image.authors="Leo Christy Jesuraj, Melissa Lee, Thomas Watson, Michal Broz, Wendy Raschke" \
38+
org.opencontainers.image.vendor="Open Liberty" \
39+
org.opencontainers.image.url="https://openliberty.io/" \
40+
org.opencontainers.image.source="https://github.com/OpenLiberty/ci.docker" \
41+
org.opencontainers.image.version="$LIBERTY_VERSION" \
42+
org.opencontainers.image.revision="$LIBERTY_BUILD_LABEL" \
43+
vendor="Open Liberty" \
44+
name="Open Liberty" \
45+
version="$LIBERTY_VERSION" \
46+
summary="Image for Open Liberty with IBM's Java and UBI 8" \
47+
description="This image contains the Open Liberty runtime with IBM's Java and Red Hat UBI 8 as the base OS. For more information on this image please see https://github.com/OpenLiberty/ci.docker#building-an-application-image"
48+
49+
COPY NOTICES /opt/ol/NOTICES
50+
COPY helpers /opt/ol/helpers
51+
COPY fixes/ /opt/ol/fixes/
52+
53+
# Install dumb-init
54+
RUN set -eux; \
55+
ARCH="$(uname -m)"; \
56+
case "${ARCH}" in \
57+
aarch64|arm64) \
58+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_aarch64'; \
59+
DUMB_INIT_SHA256=b7d648f97154a99c539b63c55979cd29f005f88430fb383007fe3458340b795e; \
60+
;; \
61+
amd64|x86_64) \
62+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64'; \
63+
DUMB_INIT_SHA256=e874b55f3279ca41415d290c512a7ba9d08f98041b28ae7c2acb19a545f1c4df; \
64+
;; \
65+
ppc64el|ppc64le) \
66+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_ppc64le'; \
67+
DUMB_INIT_SHA256=3d15e80e29f0f4fa1fc686b00613a2220bc37e83a35283d4b4cca1fbd0a5609f; \
68+
;; \
69+
s390x) \
70+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_s390x'; \
71+
DUMB_INIT_SHA256=47e4601b152fc6dcb1891e66c30ecc62a2939fd7ffd1515a7c30f281cfec53b7; \
72+
;;\
73+
*) \
74+
echo "Unsupported arch: ${ARCH}"; \
75+
exit 1; \
76+
;; \
77+
esac; \
78+
curl -LfsSo /usr/bin/dumb-init ${DUMB_INIT_URL}; \
79+
echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \
80+
chmod +x /usr/bin/dumb-init;
81+
82+
# Add default user 1001 and create wlp with right user/permissions before copying
83+
RUN adduser -u 1001 -r -g root -s /usr/sbin/nologin default \
84+
&& mkdir -p /opt/ol/wlp \
85+
&& chown -R 1001:0 /opt/ol/wlp \
86+
&& chmod -R g+rw /opt/ol/wlp
87+
88+
# Copy the runtime and licenses
89+
COPY --from=getRuntime --chown=1001:0 /opt/ol/wlp /opt/ol/wlp
90+
COPY --from=getRuntime /licenses /licenses
91+
92+
RUN yum -y install openssl \
93+
&& yum clean all
94+
95+
# Set Path Shortcuts
96+
ENV PATH=$PATH:/opt/ol/wlp/bin:/opt/ol/helpers/build \
97+
LOG_DIR=/logs \
98+
WLP_OUTPUT_DIR=/opt/ol/wlp/output \
99+
WLP_SKIP_MAXPERMSIZE=true \
100+
OPENJ9_SCC=$OPENJ9_SCC
101+
102+
# Configure Open Liberty
103+
RUN /opt/ol/wlp/bin/server create --template=javaee8 \
104+
&& rm -rf $WLP_OUTPUT_DIR/.classCache /output/workarea \
105+
&& rm -rf /opt/ol/wlp/usr/servers/defaultServer/server.env
106+
107+
# Create symlinks && set permissions for non-root user
108+
RUN mkdir /logs \
109+
&& mkdir -p /opt/ol/wlp/usr/shared/resources/lib.index.cache \
110+
&& ln -s /opt/ol/wlp/usr/shared/resources/lib.index.cache /lib.index.cache \
111+
&& mkdir -p $WLP_OUTPUT_DIR/defaultServer \
112+
&& ln -s $WLP_OUTPUT_DIR/defaultServer /output \
113+
&& ln -s /opt/ol/wlp/usr/servers/defaultServer /config \
114+
&& mkdir -p /config/configDropins/defaults \
115+
&& mkdir -p /config/configDropins/overrides \
116+
&& mkdir -p /config/dropins \
117+
&& mkdir -p /config/apps \
118+
&& ln -s /opt/ol/wlp /liberty \
119+
&& ln -s /opt/ol/fixes /fixes \
120+
&& chown -R 1001:0 /config \
121+
&& chmod -R g+rw /config \
122+
&& chown -R 1001:0 /logs \
123+
&& chmod -R g+rw /logs \
124+
&& chown -R 1001:0 /opt/ol/wlp/usr \
125+
&& chmod -R g+rw /opt/ol/wlp/usr \
126+
&& chown -R 1001:0 /opt/ol/wlp/output \
127+
&& chmod -R g+rw /opt/ol/wlp/output \
128+
&& chown -R 1001:0 /opt/ol/helpers \
129+
&& chmod -R g+rw /opt/ol/helpers \
130+
&& chown -R 1001:0 /opt/ol/fixes \
131+
&& chmod -R g+rwx /opt/ol/fixes \
132+
&& mkdir /etc/wlp \
133+
&& chown -R 1001:0 /etc/wlp \
134+
&& chmod -R g+rw /etc/wlp \
135+
&& echo "<server description=\"Default Server\"><httpEndpoint id=\"defaultHttpEndpoint\" host=\"*\" /></server>" > /config/configDropins/defaults/open-default-port.xml
136+
137+
# Create a new SCC layer
138+
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
139+
&& rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache \
140+
&& chown -R 1001:0 /opt/ol/wlp/output \
141+
&& chmod -R g+rwx /opt/ol/wlp/output
142+
143+
#These settings are needed so that we can run as a different user than 1001 after server warmup
144+
ENV RANDFILE=/tmp/.rnd \
145+
IBM_JAVA_OPTIONS="-Xshareclasses:name=liberty,readonly,nonfatal,cacheDir=/output/.classCache/ -Dosgi.checkConfiguration=false ${IBM_JAVA_OPTIONS}"
146+
147+
USER 1001
148+
149+
EXPOSE 9080 9443
150+
151+
ENTRYPOINT ["/opt/ol/helpers/runtime/docker-server.sh"]
152+
CMD ["/opt/ol/wlp/bin/server", "run", "defaultServer"]
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi AS getRuntime
2+
3+
USER root
4+
5+
ARG LIBERTY_VERSION=24.0.0.1
6+
ARG LIBERTY_SHA={replace_with_correct_sha}
7+
ARG LIBERTY_DOWNLOAD_URL=https://repo1.maven.org/maven2/io/openliberty/openliberty-runtime/$LIBERTY_VERSION/openliberty-runtime-$LIBERTY_VERSION.zip
8+
9+
ARG VERBOSE=false
10+
11+
# If there is a local copy of the image use that instead
12+
COPY resources/ /tmp/
13+
14+
# Install Open Liberty
15+
RUN yum -y install shadow-utils wget unzip openssl \
16+
&& if [ ! -f /tmp/wlp.zip ]; then wget -q $LIBERTY_DOWNLOAD_URL -U UA-Open-Liberty-Docker -O /tmp/wlp.zip; fi \
17+
&& echo "$LIBERTY_SHA /tmp/wlp.zip" > /tmp/wlp.zip.sha1 \
18+
&& sha1sum -c /tmp/wlp.zip.sha1 \
19+
&& chmod -R u+x /usr/bin \
20+
&& unzip -q /tmp/wlp.zip -d /opt/ol \
21+
&& mkdir -p /licenses \
22+
&& cp /opt/ol/wlp/LICENSE /licenses/ \
23+
&& adduser -u 1001 -r -g root -s /usr/sbin/nologin default \
24+
&& chown -R 1001:0 /opt/ol/wlp \
25+
&& chmod -R g+rw /opt/ol/wlp
26+
27+
FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi
28+
29+
USER root
30+
31+
ARG LIBERTY_VERSION=24.0.0.1
32+
ARG LIBERTY_BUILD_LABEL={replace_with_gm_driver_label}
33+
34+
ARG OPENJ9_SCC=true
35+
ARG VERBOSE=false
36+
37+
LABEL org.opencontainers.image.authors="Leo Christy Jesuraj, Melissa Lee, Thomas Watson, Michal Broz, Wendy Raschke" \
38+
org.opencontainers.image.vendor="Open Liberty" \
39+
org.opencontainers.image.url="https://openliberty.io/" \
40+
org.opencontainers.image.source="https://github.com/OpenLiberty/ci.docker" \
41+
org.opencontainers.image.version="$LIBERTY_VERSION" \
42+
org.opencontainers.image.revision="$LIBERTY_BUILD_LABEL" \
43+
vendor="Open Liberty" \
44+
name="Open Liberty" \
45+
version="$LIBERTY_VERSION" \
46+
summary="Image for Open Liberty with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and UBI 8" \
47+
description="This image contains the Open Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat UBI 8 as the base OS. For more information on this image please see https://github.com/OpenLiberty/ci.docker#building-an-application-image"
48+
49+
COPY NOTICES /opt/ol/NOTICES
50+
COPY helpers /opt/ol/helpers
51+
COPY fixes/ /opt/ol/fixes/
52+
53+
# Install dumb-init
54+
RUN set -eux; \
55+
ARCH="$(uname -m)"; \
56+
case "${ARCH}" in \
57+
aarch64|arm64) \
58+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_aarch64'; \
59+
DUMB_INIT_SHA256=b7d648f97154a99c539b63c55979cd29f005f88430fb383007fe3458340b795e; \
60+
;; \
61+
amd64|x86_64) \
62+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_x86_64'; \
63+
DUMB_INIT_SHA256=e874b55f3279ca41415d290c512a7ba9d08f98041b28ae7c2acb19a545f1c4df; \
64+
;; \
65+
ppc64el|ppc64le) \
66+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_ppc64le'; \
67+
DUMB_INIT_SHA256=3d15e80e29f0f4fa1fc686b00613a2220bc37e83a35283d4b4cca1fbd0a5609f; \
68+
;; \
69+
s390x) \
70+
DUMB_INIT_URL='https://github.com/Yelp/dumb-init/releases/download/v1.2.5/dumb-init_1.2.5_s390x'; \
71+
DUMB_INIT_SHA256=47e4601b152fc6dcb1891e66c30ecc62a2939fd7ffd1515a7c30f281cfec53b7; \
72+
;;\
73+
*) \
74+
echo "Unsupported arch: ${ARCH}"; \
75+
exit 1; \
76+
;; \
77+
esac; \
78+
curl -LfsSo /usr/bin/dumb-init ${DUMB_INIT_URL}; \
79+
echo "${DUMB_INIT_SHA256} */usr/bin/dumb-init" | sha256sum -c -; \
80+
chmod +x /usr/bin/dumb-init;
81+
82+
# Add default user 1001 and create wlp with right user/permissions before copying
83+
RUN adduser -u 1001 -r -g root -s /usr/sbin/nologin default \
84+
&& mkdir -p /opt/ol/wlp \
85+
&& chown -R 1001:0 /opt/ol/wlp \
86+
&& chmod -R g+rw /opt/ol/wlp
87+
88+
# Copy the runtime and licenses
89+
COPY --from=getRuntime --chown=1001:0 /opt/ol/wlp /opt/ol/wlp
90+
COPY --from=getRuntime /licenses /licenses
91+
92+
RUN yum -y install openssl \
93+
&& yum clean all
94+
95+
# Set Path Shortcuts
96+
ENV PATH=$PATH:/opt/ol/wlp/bin:/opt/ol/helpers/build \
97+
LOG_DIR=/logs \
98+
WLP_OUTPUT_DIR=/opt/ol/wlp/output \
99+
WLP_SKIP_MAXPERMSIZE=true \
100+
OPENJ9_SCC=$OPENJ9_SCC
101+
102+
# Configure Open Liberty
103+
RUN /opt/ol/wlp/bin/server create --template=javaee8 \
104+
&& rm -rf $WLP_OUTPUT_DIR/.classCache /output/workarea \
105+
&& rm -rf /opt/ol/wlp/usr/servers/defaultServer/server.env
106+
107+
# Create symlinks && set permissions for non-root user
108+
RUN mkdir /logs \
109+
&& mkdir -p /opt/ol/wlp/usr/shared/resources/lib.index.cache \
110+
&& ln -s /opt/ol/wlp/usr/shared/resources/lib.index.cache /lib.index.cache \
111+
&& mkdir -p $WLP_OUTPUT_DIR/defaultServer \
112+
&& ln -s $WLP_OUTPUT_DIR/defaultServer /output \
113+
&& ln -s /opt/ol/wlp/usr/servers/defaultServer /config \
114+
&& mkdir -p /config/configDropins/defaults \
115+
&& mkdir -p /config/configDropins/overrides \
116+
&& mkdir -p /config/dropins \
117+
&& mkdir -p /config/apps \
118+
&& ln -s /opt/ol/wlp /liberty \
119+
&& ln -s /opt/ol/fixes /fixes \
120+
&& chown -R 1001:0 /config \
121+
&& chmod -R g+rw /config \
122+
&& chown -R 1001:0 /logs \
123+
&& chmod -R g+rw /logs \
124+
&& chown -R 1001:0 /opt/ol/wlp/usr \
125+
&& chmod -R g+rw /opt/ol/wlp/usr \
126+
&& chown -R 1001:0 /opt/ol/wlp/output \
127+
&& chmod -R g+rw /opt/ol/wlp/output \
128+
&& chown -R 1001:0 /opt/ol/helpers \
129+
&& chmod -R g+rw /opt/ol/helpers \
130+
&& chown -R 1001:0 /opt/ol/fixes \
131+
&& chmod -R g+rwx /opt/ol/fixes \
132+
&& mkdir /etc/wlp \
133+
&& chown -R 1001:0 /etc/wlp \
134+
&& chmod -R g+rw /etc/wlp \
135+
&& if [ -e /etc/instanton.ld.so.cache ]; then chmod g+w /etc/ld.so.cache; fi \
136+
&& echo "<server description=\"Default Server\"><httpEndpoint id=\"defaultHttpEndpoint\" host=\"*\" /></server>" > /config/configDropins/defaults/open-default-port.xml
137+
138+
# Create a new SCC layer
139+
RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
140+
&& rm -rf /output/messaging /output/resources/security /logs/* $WLP_OUTPUT_DIR/.classCache \
141+
&& chown -R 1001:0 /opt/ol/wlp/output \
142+
&& chmod -R g+rwx /opt/ol/wlp/output
143+
144+
#These settings are needed so that we can run as a different user than 1001 after server warmup
145+
ENV RANDFILE=/tmp/.rnd \
146+
OPENJ9_JAVA_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal -Dosgi.checkConfiguration=false"
147+
148+
USER 1001
149+
150+
EXPOSE 9080 9443
151+
152+
ENTRYPOINT ["/opt/ol/helpers/runtime/docker-server.sh"]
153+
CMD ["/opt/ol/wlp/bin/server", "run", "defaultServer"]

0 commit comments

Comments
 (0)