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.

Before You Begin

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.

  • If the node name argument is used when running the command, it overrides the node name specified in the YAML file.
  • If the node name argument is not used, node name specified in the YAML file is used.
  • If node name is not specified as a command argument or in YAML file, default node name is used.

Example:

s2i build -e amxce_node="BookStoreNode" /home/amxce/com.tibco.restbt.sample.bookstore amxce_builder:1.0 bookstore:v1
-e amxce_env "<Environment name>" No

ActiveMatrix Service Grid - Container Edition Environment name.

Default: AMXCEEnvironment

  • If the environment name argument is used when running the command, it overrides the environment name specified in the YAML file.
  • If the environment name argument is not used, environment name specified in the YAML file is used.
  • If environment name is not specified as a command argument or in the YAML file, default environment name is used.

Example:

s2i build -e amxce_env="TestEnv" /home/amxce/com.tibco.restbt.sample.bookstore amxce_builder:1.0 bookstore:v1

Checking Image Build Logs

You can view the logs at amsgce-runtime-<version>/runtime/s2i/build/logs. The name of the log file is build_amxce_s2i_<timestamp>.log.