Skip to content

Commit 2682be1

Browse files
authored
Add features.sh to download features using featureUtility (#467)
* Add features.sh * Update file paths and add non-optimal build message * Update README.md * Add non-optimal build error message for kernel images only * Update README.md * Remove extra env vars * Update 22.0.0.9 * Revert 22.0.0.8 * Revert 22.0.0.8 * Update test-pet-clinic * Update test-stock-quote * Update test-stock-trader * Revert removal of deprecated features * Update configure.sh * Re-add missing files * Fix line spacing * Run installUtility if features.sh was not run, update test-pet-clinic * Suppress non-optimal build error message on full images * Suppress non-optimal build error message on full images 2 * Move features.sh changes to 22.0.0.10 * Revert 22.0.0.9 changes * Re-add missing Dockerfiles * Move configure-liberty.sh into build stage, re-add missing files * Move configure-liberty.sh into build stage, re-add missing files * Update call to configure-liberty.sh * Add features-installed.sh override in full images * Override features-installed.sh in 22.0.0.9 full images * Update comments * Undo chmod * Fix folder permission * Update cleanup of configure-liberty.log artifact * Fix indent spacing * Update copyright years * Update 23.0.0.1 * Merge main into kirby-patch-kernel, update to 23.0.0.2 * Update to 23.0.0.2 * Fix merge conflict * Fix merge conflict * Delete configure-liberty.sh * Add check for installed features using feature repo url * Move featureManager tag to features.sh - And opt-out creating featureManager config when FEATURES_INSTALLED is true * Remove FEATURES_INSTALLED refs from features.sh * Rebase and add features.sh to 23.0.0.4 and move configure-liberty.log into /logs * Add features.sh * Update file paths and add non-optimal build message * Update README.md * Add non-optimal build error message for kernel images only * Update README.md * Remove extra env vars * Update 22.0.0.9 * Revert 22.0.0.8 * Update test-pet-clinic * Revert removal of deprecated features * Re-add missing files * Fix line spacing * Run installUtility if features.sh was not run, update test-pet-clinic * Suppress non-optimal build error message on full images * Suppress non-optimal build error message on full images 2 * Move features.sh changes to 22.0.0.10 * Revert 22.0.0.9 changes * Re-add missing Dockerfiles * Move configure-liberty.sh into build stage, re-add missing files * Move configure-liberty.sh into build stage, re-add missing files * Add features-installed.sh override in full images * Update comments * Undo chmod * Fix folder permission * Update cleanup of configure-liberty.log artifact * Fix indent spacing * Update 23.0.0.1 * Merge main into kirby-patch-kernel, update to 23.0.0.2 * Update to 23.0.0.2 * Fix merge conflict * Fix merge conflict * Delete configure-liberty.sh * Add check for installed features using feature repo url * Revert test-pet-clinic test * Remove redundant sessioncache-features.xml copy * Use short URL for building an app image doc * Support deprecated add-on features in configure.sh only * Output features.sh warning in both full and kernel * Fix spacing * Delete extraneous XML config * Update configure.sh to match OL ci.docker * Update hazelcast-sessioncache-full.xml * Move features-installed.sh into helpers/build/internal * Revert sessioncache XML naming and use *-config.xml with features.sh * Update features-installed.sh to check /log/features.log * Update test-pet-clinic * Update test-pet-clinic * Remove configure-liberty.sh * Update test apps
1 parent b94c5d2 commit 2682be1

File tree

62 files changed

+813
-319
lines changed

Some content is hidden

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

62 files changed

+813
-319
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ Your application image template should follow a pattern similar to:
3131
```dockerfile
3232
FROM icr.io/appcafe/websphere-liberty:kernel-java8-openj9-ubi
3333

34-
# Add my app and config
35-
COPY --chown=1001:0 Sample1.war /config/dropins/
34+
# Add Liberty server configuration including all necessary features
3635
COPY --chown=1001:0 server.xml /config/
3736

37+
# This script will add the requested XML snippets to enable Liberty features and grow image to be fit-for-purpose using featureUtility.
38+
# Only available in 'kernel'. The 'full' tag already includes all features for convenience.
39+
RUN features.sh
40+
3841
# Add interim fixes (optional)
3942
COPY --chown=1001:0 interim-fixes /opt/ibm/fixes/
4043

41-
# Default setting for the verbose option
42-
ARG VERBOSE=false
44+
# Add app
45+
COPY --chown=1001:0 Sample1.war /config/dropins/
4346

4447
# This script will add the requested XML snippets, grow image to be fit-for-purpose and apply interim fixes
4548
RUN configure.sh
@@ -275,7 +278,7 @@ ARG VERBOSE=false
275278
RUN configure.sh
276279
```
277280

278-
Note: This feature requires a `curl ` command to be in the container image.
281+
Note: This feature requires a `curl` command to be in the container image.
279282
Some base images do not provide `curl`. You can add it before calling `confiure.sh` this way:
280283

281284
```dockerfile

ga/22.0.0.12/full/Dockerfile.ubi.ibmjava8

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ RUN if [ ! -z $REPOSITORIES_PROPERTIES ]; then mkdir /opt/ibm/wlp/etc/ \
2424
&& rm -rf /output/workarea /output/logs \
2525
&& find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw
2626

27-
2827
COPY --chown=1001:0 server.xml /config/
2928

3029
# Create a new SCC layer

ga/22.0.0.12/kernel/Dockerfile.ubi.ibmjava8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LABEL org.opencontainers.image.authors="Leo Christy Jesuraj, Arthur De Magalhaes
3030
name="IBM WebSphere Liberty" \
3131
version="22.0.0.12" \
3232
summary="Image for WebSphere Liberty with IBM's Java and Red Hat's UBI 8" \
33-
description="This image contains the WebSphere Liberty runtime with IBM's Java and Red Hat's UBI 8 as the base OS. For more information on this image please see https://github.com/WASdev/ci.docker#building-an-application-image"
33+
description="This image contains the WebSphere Liberty runtime with IBM's Java and Red Hat's UBI 8 as the base OS. For more information on this image please see https://ibm.biz/wl-app-image-template"
3434

3535
# Install WebSphere Liberty
3636
ENV LIBERTY_VERSION 22.0.0_12
@@ -115,7 +115,7 @@ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
115115
&& chown -R 1001:0 /opt/ibm/wlp/output \
116116
&& chmod -R g+rwx /opt/ibm/wlp/output
117117

118-
#These settings are needed so that we can run as a different user than 1001 after server warmup
118+
# These settings are needed so that we can run as a different user than 1001 after server warmup
119119
ENV RANDFILE=/tmp/.rnd \
120120
IBM_JAVA_OPTIONS="-Xshareclasses:name=liberty,readonly,nonfatal,cacheDir=/output/.classCache/ -Dosgi.checkConfiguration=false ${IBM_JAVA_OPTIONS}"
121121

ga/22.0.0.12/kernel/Dockerfile.ubi.openjdk11

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LABEL org.opencontainers.image.authors="Leo Christy Jesuraj, Arthur De Magalhaes
3030
name="IBM WebSphere Liberty" \
3131
version="22.0.0.12" \
3232
summary="Image for WebSphere Liberty with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8" \
33-
description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8 as the base OS. For more information on this image please see https://github.com/WASdev/ci.docker#building-an-application-image"
33+
description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8 as the base OS. For more information on this image please see https://ibm.biz/wl-app-image-template"
3434

3535
# Install WebSphere Liberty
3636
ENV LIBERTY_VERSION 22.0.0_12
@@ -116,7 +116,7 @@ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
116116
&& chown -R 1001:0 /opt/ibm/wlp/output \
117117
&& chmod -R g+rwx /opt/ibm/wlp/output
118118

119-
#These settings are needed so that we can run as a different user than 1001 after server warmup
119+
# These settings are needed so that we can run as a different user than 1001 after server warmup
120120
ENV RANDFILE=/tmp/.rnd \
121121
OPENJ9_JAVA_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal -Dosgi.checkConfiguration=false"
122122

ga/22.0.0.12/kernel/Dockerfile.ubi.openjdk17

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LABEL org.opencontainers.image.authors="Leo Christy Jesuraj, Chris Potter, Melis
3030
name="IBM WebSphere Liberty" \
3131
version="22.0.0.12" \
3232
summary="Image for WebSphere Liberty with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8" \
33-
description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8 as the base OS. For more information on this image please see https://github.com/WASdev/ci.docker#building-an-application-image"
33+
description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8 as the base OS. For more information on this image please see https://ibm.biz/wl-app-image-template"
3434

3535
# Install WebSphere Liberty
3636
ENV LIBERTY_VERSION 22.0.0_12
@@ -116,7 +116,7 @@ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
116116
&& chown -R 1001:0 /opt/ibm/wlp/output \
117117
&& chmod -R g+rwx /opt/ibm/wlp/output
118118

119-
#These settings are needed so that we can run as a different user than 1001 after server warmup
119+
# These settings are needed so that we can run as a different user than 1001 after server warmup
120120
ENV RANDFILE=/tmp/.rnd \
121121
OPENJ9_JAVA_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal -Dosgi.checkConfiguration=false"
122122

ga/22.0.0.12/kernel/Dockerfile.ubi.openjdk8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LABEL org.opencontainers.image.authors="Leo Christy Jesuraj, Arthur De Magalhaes
3030
name="IBM WebSphere Liberty" \
3131
version="22.0.0.12" \
3232
summary="Image for WebSphere Liberty with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8" \
33-
description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8 as the base OS. For more information on this image please see https://github.com/WASdev/ci.docker#building-an-application-image"
33+
description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Red Hat's UBI 8 as the base OS. For more information on this image please see https://ibm.biz/wl-app-image-template"
3434

3535
# Install WebSphere Liberty
3636
ENV LIBERTY_VERSION 22.0.0_12
@@ -116,7 +116,7 @@ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
116116
&& chown -R 1001:0 /opt/ibm/wlp/output \
117117
&& chmod -R g+rwx /opt/ibm/wlp/output
118118

119-
#These settings are needed so that we can run as a different user than 1001 after server warmup
119+
# These settings are needed so that we can run as a different user than 1001 after server warmup
120120
ENV RANDFILE=/tmp/.rnd \
121121
OPENJ9_JAVA_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal -Dosgi.checkConfiguration=false"
122122

ga/22.0.0.12/kernel/Dockerfile.ubuntu.ibmjava8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LABEL org.opencontainers.image.authors="Leo Christy Jesuraj, Arthur De Magalhaes
2626
org.opencontainers.image.documentation="https://www.ibm.com/support/knowledgecenter/SSAW57_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/cwlp_about.html" \
2727
org.opencontainers.image.version="22.0.0.12" \
2828
org.opencontainers.image.revision="cl221220221107-1900" \
29-
org.opencontainers.image.description="This image contains the WebSphere Liberty runtime with IBM's Java and Ubuntu as the base OS. For more information on this image please see https://github.com/WASdev/ci.docker#building-an-application-image" \
29+
org.opencontainers.image.description="This image contains the WebSphere Liberty runtime with IBM's Java and Ubuntu as the base OS. For more information on this image please see https://ibm.biz/wl-app-image-template" \
3030
org.opencontainers.image.title="IBM WebSphere Liberty"
3131

3232
# Install WebSphere Liberty
@@ -114,7 +114,7 @@ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
114114
&& chown -R 1001:0 /opt/ibm/wlp/output \
115115
&& chmod -R g+rwx /opt/ibm/wlp/output
116116

117-
#These settings are needed so that we can run as a different user than 1001 after server warmup
117+
# These settings are needed so that we can run as a different user than 1001 after server warmup
118118
ENV RANDFILE=/tmp/.rnd \
119119
IBM_JAVA_OPTIONS="-Xshareclasses:name=liberty,readonly,nonfatal,cacheDir=/output/.classCache/ -Dosgi.checkConfiguration=false ${IBM_JAVA_OPTIONS}"
120120

ga/22.0.0.12/kernel/Dockerfile.ubuntu.openjdk11

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LABEL org.opencontainers.image.authors="Arthur De Magalhaes, Chris Potter, Chris
2626
org.opencontainers.image.documentation="https://www.ibm.com/support/knowledgecenter/SSAW57_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/cwlp_about.html" \
2727
org.opencontainers.image.version="22.0.0.12" \
2828
org.opencontainers.image.revision="cl221220221107-1900" \
29-
org.opencontainers.image.description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Ubuntu as the base OS. For more information on this image please see https://github.com/WASdev/ci.docker#building-an-application-image" \
29+
org.opencontainers.image.description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Ubuntu as the base OS. For more information on this image please see https://ibm.biz/wl-app-image-template" \
3030
org.opencontainers.image.title="IBM WebSphere Liberty"
3131

3232
# Install WebSphere Liberty
@@ -114,7 +114,7 @@ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
114114
&& chown -R 1001:0 /opt/ibm/wlp/output \
115115
&& chmod -R g+rwx /opt/ibm/wlp/output
116116

117-
#These settings are needed so that we can run as a different user than 1001 after server warmup
117+
# These settings are needed so that we can run as a different user than 1001 after server warmup
118118
ENV RANDFILE=/tmp/.rnd \
119119
OPENJ9_JAVA_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal -Dosgi.checkConfiguration=false"
120120

ga/22.0.0.12/kernel/Dockerfile.ubuntu.openjdk17

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ LABEL org.opencontainers.image.authors="Chris Potter, Christy Jesuraj, Melissa L
2626
org.opencontainers.image.documentation="https://www.ibm.com/support/knowledgecenter/SSAW57_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/cwlp_about.html" \
2727
org.opencontainers.image.version="22.0.0.12" \
2828
org.opencontainers.image.revision="cl221220221107-1900" \
29-
org.opencontainers.image.description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Ubuntu as the base OS. For more information on this image please see https://github.com/WASdev/ci.docker#building-an-application-image" \
29+
org.opencontainers.image.description="This image contains the WebSphere Liberty runtime with IBM Semeru Runtime Open Edition OpenJDK with OpenJ9 and Ubuntu as the base OS. For more information on this image please see https://ibm.biz/wl-app-image-template" \
3030
org.opencontainers.image.title="IBM WebSphere Liberty"
3131

3232
# Install WebSphere Liberty
@@ -114,7 +114,7 @@ RUN if [ "$OPENJ9_SCC" = "true" ]; then populate_scc.sh; fi \
114114
&& chown -R 1001:0 /opt/ibm/wlp/output \
115115
&& chmod -R g+rwx /opt/ibm/wlp/output
116116

117-
#These settings are needed so that we can run as a different user than 1001 after server warmup
117+
# These settings are needed so that we can run as a different user than 1001 after server warmup
118118
ENV RANDFILE=/tmp/.rnd \
119119
OPENJ9_JAVA_OPTIONS="-XX:+IgnoreUnrecognizedVMOptions -XX:+IdleTuningGcOnIdle -Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal -Dosgi.checkConfiguration=false"
120120

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<server>
2+
<httpSessionCache libraryRef="HazelcastLib">
3+
<properties hazelcast.config.location="file:${shared.config.dir}/hazelcast/hazelcast.xml"/>
4+
</httpSessionCache>
5+
<library id="HazelcastLib">
6+
<fileset dir="${shared.resource.dir}/hazelcast"/>
7+
</library>
8+
</server>

0 commit comments

Comments
 (0)