This repository includes a build.sh
script for building custom Docker images using predefined templates. The script supports dynamic template selection, image naming, and a debug mode.
- Download th IBM webMethods Installer from IBM and copy the file as
installer.bin
to the root folder - get an entitlement key and user from IBM
- Set the environments variables (see Environment Variables)
./build.sh [-t template] [-i image] [-d]
-
-t template
The template directory inside./templates/
to use for building the image.
Example:-t mws
(which uses./templates/mws/
) -
-i image
The name (and optionally tag) of the image to build.
Example:-i myimage:latest
-
-d
Debug mode. Only runs thedocker build
command without appending the installation instructions from the template.
- Docker or Podman installed
installer.bin
file placed in the project root directory- A
products
file inside the template directory listing the products to install - A valid
Dockerfile
in the repository (used as the base Dockerfile) - A
templates/<template>/Dockerfile
andtemplates/<template>/install
file to extend the base image
You must set the following environment variables before running build.sh
:
ENTITLEMENT_USER
– Your IBM entitlement usernameENTITLEMENT_KEY
– Your IBM entitlement keyINSTALLER_VERSION
– (Optional) Version of the installerRELEASE
– (Optional) Release name or versionADMIN_PASSWORD
– (Optional) Password for the admin userBASE_IMAGE
– (Optional) Base image to use in the Docker build
A typical template directory should look like this:
templates/
<template>/
Dockerfile # Docker instructions specific to this template
install # Installation instructions appended to Dockerfile.tmp
products # List of products to be installed
Use -d
to enable debug mode:
./build.sh -t mws -i testimage:debug -d
This will:
- Skip adding the template's
Dockerfile
andinstall
content - Run only the raw
docker build
command
Temporary files Dockerfile.tmp
and installer.script.tmp
may be created during build. Remove them if needed:
rm -f Dockerfile.tmp installer.script.tmp
ENTITLEMENT_USER=myuser ENTITLEMENT_KEY=mykey RELEASE=1015 BASE_IMAGE=docker.io/redhat/ubi8:latest ADMIN_PASSWORD=manage ./build.sh -t mws -i mws-custom:10.15
- Make sure to download
installer.bin
from IBM FixCentral (search for webMethods Installer). - Your IBM ID and entitlement details are required to access certain components.