Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ COPY --chown=1001:0 server.xml /config/
# A sample is in the 'Getting Required Features' section below
COPY --chown=1001:0 featureUtility.properties /opt/ibm/wlp/etc/

# This script will add the requested XML snippets to enable Liberty features and grow the image to be fit-for-purpose using featureUtility.
RUN features.sh

# Add interim fixes (optional)
COPY --chown=1001:0 interim-fixes /opt/ibm/fixes/

# This script will add the requested XML snippets to enable Liberty features, grow the image to be fit-for-purpose using featureUtility and apply any interim fixes.
RUN features.sh

# Add application
COPY --chown=1001:0 Sample1.war /config/dropins/

# This script will add the requested server configurations, apply any interim fixes and populate caches to optimize runtime
# This script will add the requested server configurations and populate caches to optimize runtime
RUN configure.sh
```

Expand Down
15 changes: 8 additions & 7 deletions ga/latest/kernel/helpers/build/configure.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# (C) Copyright IBM Corporation 2020, 2025.
# (C) Copyright IBM Corporation 2020, 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,7 @@ else
FEATURES_INSTALLED=false
fi

. /opt/ibm/helpers/build/internal/logger.sh
. /opt/ibm/helpers/build/internal/utils.sh

set -Eeox pipefail

Expand Down Expand Up @@ -150,10 +150,6 @@ function main() {
fi
fi

# Apply interim fixes found in /opt/ibm/fixes
# Fixes recommended by IBM, such as to resolve security vulnerabilities, are also included in /opt/ibm/fixes
# Note: This step should be done once needed features are enabled and installed using installUtility.

# Do not create a SCC
if [ -n "${IBM_JAVA_OPTIONS}" ]; then
IBM_JAVA_OPTIONS="${IBM_JAVA_OPTIONS} -Xshareclasses:none"
Expand All @@ -163,7 +159,10 @@ function main() {
OPENJ9_JAVA_OPTIONS="${OPENJ9_JAVA_OPTIONS} -Xshareclasses:none"
fi

find /opt/ibm/fixes -type f -name "*.jar" -print0 | sort -z | xargs -0 -n 1 -r -I {} java -jar {} --installLocation $WLP_INSTALL_DIR
# Apply interim fixes found in /opt/ibm/fixes
# Fixes recommended by IBM, such as to resolve security vulnerabilities, are also included in /opt/ibm/fixes
# Note: This step should only be done ONCE needed features are enabled and installed.
installFixes
#Make sure that group write permissions are set correctly after installing new features
find /opt/ibm/wlp ! -perm -g=rw -print0 | xargs -r -0 chmod g+rw

Expand Down Expand Up @@ -193,6 +192,8 @@ function main() {
fi
eval $cmd
fi

removeBuildArtifacts
}

## parse provider list to generate files into configDropins
Expand Down
11 changes: 8 additions & 3 deletions ga/latest/kernel/helpers/build/features.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# (C) Copyright IBM Corporation 2023, 2025.
# (C) Copyright IBM Corporation 2023, 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
. /opt/ibm/helpers/build/internal/logger.sh
. /opt/ibm/helpers/build/internal/utils.sh

set -Eeox pipefail

Expand Down Expand Up @@ -43,4 +43,9 @@ fi
featureUtility installServerFeatures --acceptLicense defaultServer --noCache
find /opt/ibm/wlp/lib /opt/ibm/wlp/bin ! -perm -g=rw -print0 | xargs -0 -r chmod g+rw

echo "features.sh script has been run" > /logs/features.log
# Apply interim fixes found in /opt/ibm/fixes
# Fixes recommended by IBM, such as to resolve security vulnerabilities, are also included in /opt/ibm/fixes
# Note: This step should only be done ONCE needed features are enabled and installed.
installFixes

echo "features.sh script has been run successfully" > /logs/features.log
4 changes: 2 additions & 2 deletions ga/latest/kernel/helpers/build/infinispan-client-setup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# (C) Copyright IBM Corporation 2020, 2025.
# (C) Copyright IBM Corporation 2020, 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
. /opt/ibm/helpers/build/internal/logger.sh
. /opt/ibm/helpers/build/internal/utils.sh

set -Eeox pipefail

Expand Down
13 changes: 13 additions & 0 deletions ga/latest/kernel/helpers/build/internal/features-installed.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
#!/bin/bash
# (C) Copyright IBM Corporation 2025, 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

if [ -f "/logs/features.log" ]; then
rm /logs/features.log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# (C) Copyright IBM Corporation 2025.
# (C) Copyright IBM Corporation 2025, 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -14,6 +14,8 @@
# limitations under the License.

function main() {
WLP_TYPE=ibm
WLP_INSTALL_DIR=/opt/$WLP_TYPE/wlp
if [ "$VERBOSE" != "true" ]; then
exec >/dev/null
fi
Expand All @@ -27,4 +29,15 @@ function showLogs() {
exec 1>&3 3>&- 2>&4 4>&-
}

function installFixes() {
if [ ! -f "/logs/fixes.log" ] && ls "/opt/$WLP_TYPE/fixes"/*.jar 1> /dev/null 2>&1; then
find /opt/$WLP_TYPE/fixes -type f -name "*.jar" -print0 | sort -z | xargs -0 -n 1 -r -I {} java -jar {} --installLocation $WLP_INSTALL_DIR
echo "installFixes has been run successfully" > /logs/fixes.log
fi
}

function removeBuildArtifacts() {
rm -f /logs/fixes.log
}

main
4 changes: 2 additions & 2 deletions ga/latest/kernel/helpers/build/populate_scc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# (C) Copyright IBM Corporation 2020, 2025.
# (C) Copyright IBM Corporation 2020, 2026.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,7 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
. /opt/ibm/helpers/build/internal/logger.sh
. /opt/ibm/helpers/build/internal/utils.sh

set -Eeox pipefail

Expand Down