Building the Application Docker Image by Using Docker Build
Scripts and Dockerfiles are provided in the deployment package to build a Docker image for the ActiveMatrix Service Grid - Container Edition application.
- See Preparing for Containerization.
- For more information about Dockerfiles, see Dockerfiles for ActiveMatrix Service Grid - Container Edition.
- Ensure that you have generated and configured Application Configuration (YAML) file and optionally the Log4j and JVM configuration files. For more information, see Generating Application Configuration File (YAML).
-
If you do not provide
node_jvm_parameters.config.yaml
andnode-log4j.xml
files, Image creation takesamsgce-runtime-<version>/runtime/scripts/node.properties
andamsgce-runtime-<version>/runtime/scripts/node-log4j.xml_template
files. You can update the settings of these files to update the default JVM Arguments and Logging Configuration for the application. - (Optional) To copy custom features to application Docker image, see Adding Custom Features to Application Docker Image.
- Procedure
- Navigate to <temp_directory>/amsgce-runtime-<version>/runtime/build.
- To build TIBCO ActiveMatrix Application Docker image, run the following command. Specify the location of the folder or the
.zip
file that contains configuration YAML file, DAA, and optionally the Log4j and JVM configuration files by using--app_location
argument.Syntax:
./build_amxce.sh --app_location <Application Configuration folder location> -i <Image name> -n <Node name> -e <Environment name> -l <Image Build log level>
Example:
./build_amxce.sh --image_tag "bookstore:1.0" --app_location /home/tibco/bookstore
The following table lists the arguments that you can pass when building an application Docker image.
Argument |
Optional / Required |
Description |
---|---|---|
-i / --image_tag <Image name>
|
Required |
Image tag for the Docker image. <Image name> must be in the form of "Image name (Repository):tag or version" such as bookstore:1.0. Image name must not contain space. |
-n / --amxce_node <Nodename>
|
Optional
|
ActiveMatrix Service Grid - Container Edition node name in the container. Default: AMXCENode Node name must start with an alphabet character. It can have only alphanumeric, underscore (_), and hyphen (-) characters. If the node name is specified when running the command, it overrides the node name specified in the YAML file. If the node name is not specified as a command argument, 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. |
-e / --amxce_env <Environment name> |
Optional |
ActiveMatrix Service Grid - Container Edition Environment name in a container. Default: AMXCEEnvironment If the environment name is specified when running the command, it overrides the environment name specified in the YAML file. If the environment name is not specified as a command argument, environment name specified in the YAML file is used. If environment name is not specified as a command argument or in YAML file, default environment name is used. |
-l / --log_level <Image Build Log level>
|
Optional |
Set Helpful in debugging build failures. Default: 0 |
-java <Java package file location> |
Optional |
Specify the location of the 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 automatically copied to the 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:
|
-app | --app_location <Application folder location> | Required |
Location of the application folder or the
.zip file that contains configuration YAML file, DAA, and optionally the Log4j and JVM configuration files.Note: Ensure that the application file or folder location is not in the
amsgce-runtime-<version>/runtime folder. Image creation fails if the application location is in the runtime folder.Supported folder structure of the Application .zip file or the Application Folder:
Example: ./build_amxce.sh -i bookstore:1.0 -app /Users/amxce/demo/sample_app.zip ./build_amxce.sh -i bookstore:1.0 -app /Users/amxce/demo/sample_app |
dockerfile <Dockerfile Name> | Optional |
Specify Dockerfile name to use a Dockerfile other than the default one. Default Dockerfile is Example:
|
-h / --help
|
Optional | Displays help for the script file. |
Checking Image Build Logs
You can view the logs at amsgce-runtime-<version>/runtime/build/logs
. The name of the log file is amxcebuild-<timestamp>.log
.