Skip to content

Commit 0ba8471

Browse files
committed
Use full OL image
Signed-off-by: Adam Wisniewski <[email protected]>
1 parent 81e1aa8 commit 0ba8471

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

Diff for: build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ OL_RUNTIME_VERSION="${OL_RUNTIME_VERSION:-20.0.0.12}"
1818
#
1919
# The Open Liberty base image used in the final stage of the outer loop Dockerfile used to build your application image from
2020
#
21-
OL_UBI_IMAGE="${OL_UBI_IMAGE:-openliberty/open-liberty:20.0.0.12-kernel-slim-java11-openj9-ubi}"
21+
OL_UBI_IMAGE="${OL_UBI_IMAGE:-openliberty/open-liberty:20.0.0.12-full-java11-openj9-ubi}"
2222

2323
#
2424
# The name and tag of the "stack image you will build. This will used to create your inner loop development containers, and also as the base image for the first stage of your outer loop image build.
@@ -28,12 +28,12 @@ STACK_IMAGE="${STACK_IMAGE:-openliberty/application-stack:0.4}"
2828
#
2929
# URL at which your outer loop Dockerfile is hosted
3030
#
31-
DEVFILE_DOCKERFILE_LOC="${DEVFILE_DOCKERFILE_LOC:-https://github.com/OpenLiberty/application-stack/releases/download/outer-loop-0.4.0/Dockerfile}"
31+
DEVFILE_DOCKERFILE_LOC="${DEVFILE_DOCKERFILE_LOC:-https://github.com/OpenLiberty/application-stack/releases/download/outer-loop-0.4.1/Dockerfile}"
3232

3333
#
3434
# URL at which your outer loop deploy YAML template is hosted
3535
#
36-
DEVFILE_DEPLOY_YAML_LOC="${DEVFILE_DEPLOY_YAML_LOC:-https://github.com/OpenLiberty/application-stack/releases/download/outer-loop-0.4.0/app-deploy.yaml}"
36+
DEVFILE_DEPLOY_YAML_LOC="${DEVFILE_DEPLOY_YAML_LOC:-https://github.com/OpenLiberty/application-stack/releases/download/outer-loop-0.4.1/app-deploy.yaml}"
3737

3838
# Generates application stack artifacts.
3939
generate() {

Diff for: stackimage/config/configDropins/defaults/liberty-stack-mpHealth.xml

100644100755
File mode changed.

Diff for: templates/devfile.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
schemaVersion: 2.0.0
22
metadata:
33
name: java-openliberty
4-
version: 0.4.0
4+
version: 0.4.1
55
description: Java application stack using Open Liberty runtime
66
alpha.build-dockerfile: "{{.DEVFILE_DOCKERFILE_LOC}}"
77
alpha.deployment-manifest: "{{.DEVFILE_DEPLOY_YAML_LOC}}"

Diff for: templates/outer-loop/Dockerfile

+17-13
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,23 @@ COPY --from=compile --chown=1001:0 /work/configlibdir/ /config
4040
# 2c) Copy user defined server config, bootstrap.properties, etc.
4141
COPY --from=compile --chown=1001:0 /work/config/ /config/
4242

43-
# 2d) Install the required features based on the defined configuration. This enables Liberty features and image size to be fit-for-purpose using featureUtility.
44-
RUN features.sh
45-
46-
# 2e) Add the microprofile health feature configuration if it is not already defined in the user's configuration.
47-
RUN mkdir -p /tmp/stack/config/configDropins/defaults
48-
COPY --from=compile --chown=1001:0 /stack/ol/config/configDropins/defaults/ /tmp/stack/config/configDropins/defaults/
49-
RUN if ! /opt/ol/wlp/bin/productInfo featureInfo | grep -q mpHealth-[0-9]*.[0-9]*; then \
50-
cp /tmp/stack/config/configDropins/defaults/liberty-stack-mpHealth.xml /config/configDropins/defaults; \
51-
features.sh; \
52-
fi
53-
RUN rm -rf /tmp/stack
54-
55-
# 2f) Copy the application binary
43+
# 2d) Add the microprofile health feature configuration if it is not already defined in the user's configuration.
44+
# This allows k8s to use the deployment's health probes.
45+
COPY --from=compile --chown=1001:0 /stack/ol/config/configDropins/defaults/liberty-stack-mpHealth.xml /config/configDropins/defaults
46+
RUN for FILE in /config/*.xml; do \
47+
if cat $FILE | sed '/<!--.*-->/d' | sed '/<!--/,/-->/d' \
48+
| grep -q '<feature>\s*mpHealth-[0-9]*.[0-9]*\s*</feature>\|<feature>\s*microProfile-[0-9]*.[0-9]*\s*</feature>'; then \
49+
rm /config/configDropins/defaults/liberty-stack-mpHealth.xml; \
50+
fi; \
51+
done
52+
53+
# This Dockerfile uses the Open Liberty "full" image. If this is changed to use the Open Liberty kernel-slim image, uncomment the line below to install all necessary features.
54+
# RUN features.sh
55+
56+
# 2e) Copy the application binary
5657
COPY --from=compile --chown=1001:0 /work/outer-loop-app/target/*.[ew]ar /config/apps
58+
59+
# 2f) Run configure.sh
60+
ENV OPENJ9_SCC=true
5761
RUN configure.sh && \
5862
chmod 664 /opt/ol/wlp/usr/servers/*/configDropins/defaults/keystore.xml

0 commit comments

Comments
 (0)