Creating Application Docker Image from Builder Image by Using S2I Tool
You can build an application Docker image based on a builder image by using OpenShift S2I tool. This application image contains <TIBCO_HOME>, operating system, and all required libraries required to run an application.
- See Preparing for Containerization.
- Ensure that you have generated and configured application Configuration (YAML) file. For more information about generating application configuration YAML file, see Generating Application Configuration File (YAML).
- Ensure that you have created ActiveMatrix Service Grid - Container Edition builder Docker image. For more information, see Creating ActiveMatrix Service Grid - Container Edition Builder Image Using S2I Tool.
Procedure
To build application Docker image run the following command:
Syntax:
s2i build <Path to DAA and Application Configuration YAML file> <Builder Image Name > <Application Image name>
Example:
s2i build /home/amxce/com.tibco.restbt.sample.bookstore amxce_builder:1.0 bookstore:v1
You can pass the following arguments when building an application Docker image. To get a list of arguments, run the following command:
s2i usage <Builder Image Name>
Argument | Required | Description |
---|---|---|
-e amxce_node "<Node name>"
|
No |
ActiveMatrix Service Grid - Container Edition Node name. Default: AMXCENode Node name must start with a letter of the alphabet character. It can have only alphanumeric, underscore (_) and hyphen (-) characters.
Example:
|
-e amxce_env "<Environment name>"
|
No |
ActiveMatrix Service Grid - Container Edition Environment name. Default: AMXCEEnvironment
Example:
|
Checking Image Build Logs
You can view the logs atamsgce-runtime-<version>/runtime/s2i/build/logs
. The name of the log file is build_amxce_s2i_<timestamp>.log
.