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.
- See Preparing for Containerization.
- Download and install latest binary of S2I from https://github.com/openshift/source-to-image/releases/. After installation, ensure to add the location of the S2I binary to your PATH environment variable.
- For default JVM arguments and Log4j configuration, see Default JVM Arguments and Logging Configuration for Application Image and Builder Image.
- To deploy custom features such as database drivers to all application Docker images, see Adding Custom Features to Builder Image.
- Procedure
- Navigate to amsgce-runtime-<version>/runtime/build/s2i.
- 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: |
-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 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:
|
-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:
|
--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: |
-v / --version | Optional | Displays version of the build_amxce_s2i executable. |