This repository includes a record.sh script for recording image builds and 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.binto 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 buildcommand without appending the installation instructions from the template.
- Docker or Podman installed
installer.binfile placed in the project root directory- A
productsfile inside the template directory listing the products to install - A valid
Dockerfilein the repository (used as the base Dockerfile) - A
templates/<template>/Dockerfileandtemplates/<template>/installfile 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 -dThis will:
- Skip adding the template's
Dockerfileandinstallcontent - Run only the raw
docker buildcommand
Temporary files Dockerfile.tmp and installer.script.tmp may be created during build. Remove them if needed:
rm -f Dockerfile.tmp installer.script.tmpENTITLEMENT_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.binfrom IBM FixCentral (search for webMethods Installer). - Your IBM ID and entitlement details are required to access certain components.