Creating ActiveMatrix Service Grid - Container Edition Builder Image Using S2I Tool

OpenShift S2I is a tool for building reproducible Docker images. By using the S2I tool, you can create a builder image, which contains an operating system, all required libraries, and <TIBCO_HOME> with all the required scripts. You can reuse this builder image to create a new application Docker image. S2I supports reusing of previously downloaded dependencies and previously built artifacts. You need not build all dependencies each time you build an application Docker image.

Before You Begin
    Procedure
  1. Navigate to amsgce-runtime-<version>/runtime/build/s2i.
  2. Create Builder image by using the following script. You must create the builder image only once for the ActiveMatrix Service Grid - Container Edition release.

    For Linux Platform:

    ./build_amxce_s2i -i <Builder Image Name>

    For Windows Platform:

    build_amxce_s2i.exe -i <Builder Image Name>

    Example:

    ./build_amxce_s2i -i amxce_builder:1.0

The following table lists the arguments to pass when building Builder Docker image. You can specify the arguments to be passed in the amsgce-runtime-<version>\runtime\build\s2i\build_amxce_s2i.yaml file or you can specify the arguments when running the command. Arguments specified when running the command have precedence over the arguments specified in the YAML file.

Argument Optional / Required Description
-b / --base_dir <Base directory path> Optional

The base directory in which the build files are located. If not specified, the current directory is considered as base location directory.

Default: amsgce-runtime-<version>/runtime/build/s2i

-i / --image_tag <Image name> Required

Image tag for the Docker image.

Image name must not contain space.

--java <Java package file location> Optional

Location of Java Package to be used to create the image.

This option can be used to provide pre-downloaded JDK or JRE to be used while creating the image. Image creation script skips downloading Java from a remote site when this option is provided. Specified Java package is copied automatically to amsgce-runtime-<version>/runtime/java. Previously specified package is removed from amsgce-runtime-<version>/runtime/java before copying the new package.

Note: Do not manually copy the package directly to amsgce-runtime-<version>/runtime/java.
Note: Do not specify the folder location. This must be the compressed Java package file location.

Example:

./build_amxce_s2i -i bookstore:1.0 -java /Users/Downloads/openjdk-11+28_linux-x64_bin.tar12.gz

-c | --custom_feature Optional

To add a custom feature such as database drivers to all application images of S2I build, add custom feature to the builder image. Then this custom feature is installed on all application images created by using the builder image.

Specify the folder containing custom feature or custom feature DAA file. If folder location is passed as an argument then all custom features in that folder are copied.

Example:

./build_amxce_s2i --image_tag "bookstore:1.0" --custom_feature "/path/to/Custom Feature folder"

--dockerfile <Dockerfile Name> Optional

Specify Dockerfile name to use a Dockerfile other than the default one.

Example:

./build_amxce_s2i --image_tag "amxce_builder:1.0" --dockerfile Dockerfile_ubi8_java11
-h / --help Optional Displays help for the command.
--config <Configuration file> Optional

Configuration YAML file in which you can specify arguments to be passed to the command.

Default: amsgce-runtime-<version>/runtime/build/s2i/build_amxce_s2i.yaml

-v / --version Optional Displays version of the build_amxce_s2i executable.

What to do nextYou can create an application Docker image based on builder image. For more information, see Creating Application Docker Image from Builder Image by Using S2I Tool.