Skip to content

Commit 4a06cc7

Browse files
authored
Merge pull request #102 from awisniew90/full-image
Use full OL image
2 parents 81e1aa8 + fac1cca commit 4a06cc7

File tree

4 files changed

+25
-12
lines changed

4 files changed

+25
-12
lines changed

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.5.0/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.5.0/app-deploy.yaml}"
3737

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

stackimage/config/configDropins/defaults/liberty-stack-mpHealth.xml

100644100755
File mode changed.

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}}"

templates/outer-loop/Dockerfile

+21-8
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,32 @@ 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.
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.
4745
RUN mkdir -p /tmp/stack/config/configDropins/defaults
4846
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; \
47+
48+
ARG ADD_MP_HEALTH=true
49+
RUN if [ "$ADD_MP_HEALTH" = "true" ]; then \
50+
/opt/ol/wlp/bin/server start; \
51+
/opt/ol/wlp/bin/server stop; \
52+
if ! grep "CWWKF0012I" /logs/messages.log | grep -q 'mpHealth-[0-9]*.[0-9]*\|microProfile-[0-9]*.[0-9]*'; then \
53+
echo "Missing mpHealth feature - adding config snippet"; \
54+
cp /tmp/stack/config/configDropins/defaults/liberty-stack-mpHealth.xml /config/configDropins/overrides; \
55+
else \
56+
echo "Found mpHealth feature - not adding config snippet"; \
57+
fi; \
58+
rm -rf /logs/*; \
59+
elif [ "$ADD_MP_HEALTH" != "false" ]; then \
60+
echo "Invalid ADD_MP_HEALTH value: $ADD_MP_HEALTH. Valid values are \"true\" | \"false\" "; \
5261
fi
62+
5363
RUN rm -rf /tmp/stack
5464

55-
# 2f) Copy the application binary
65+
# 2e) Copy the application binary
5666
COPY --from=compile --chown=1001:0 /work/outer-loop-app/target/*.[ew]ar /config/apps
67+
68+
# 2f) Run configure.sh
69+
ENV OPENJ9_SCC=true
5770
RUN configure.sh && \
5871
chmod 664 /opt/ol/wlp/usr/servers/*/configDropins/defaults/keystore.xml

0 commit comments

Comments
 (0)