Building an ApplinX Docker Image

This document describes how to build an ApplinX Docker image and run the Docker container using scripts provided with ApplinX. It covers the following topics:


Prerequisites

  • Docker installation 1.13.1 or compatible

  • Software AG ApplinX installation

Building and Running the ApplinX Docker Image

The scripts provided with ApplinX support the following three methods of building a Docker image and running the Docker container.

Using the Default Configuration

Start of instruction setTo use the default configuration

  1. Set your working directory to <install_dir>/ApplinX/Docker.

  2. Create the TAR file containing all the necessary files with the following command:

    ./createApplinXDistributions.sh
  3. Provide your License file, for example: <install_dir>/ApplinX/Docker/License/myLicense.xml.

  4. Build the ApplinX image, for example:

    docker build -t [Image Name] .

    This method uses the default configuration after the installation, for example:

    docker run -p 8080:8080 -p 2323:2323 [Image Name]
  • Advantages
    The complete configuration is in the image. For troubleshooting, Software AG Support will require only the command you entered.

  • Disadvantage
    The only thing you can change is the ApplinX port mapping.

Using a Modified Configuration

Start of instruction setTo use modified configuration files

  1. Set your working directory to <install_dir>/ApplinX/Docker.

  2. Create the TAR file containing all the necessary files with the following command:

    ./createApplinXDistributions.sh
  3. Provide your License file, for example: <install_dir>/ApplinX/Docker/License/myLicense.xml.

  4. Change your configuration files:

    • <install_dir>/ApplinX/Docker/Configuration/gx_updateAppConfig.xml

    • <install_dir>/ApplinX/Docker/Configuration/gx_appConfig.xml

    • <install_dir>/ApplinX/Docker/Configuration/gx_clientConfig.xml

    • <install_dir>/ApplinX/Docker/Configuration/gx_keyboardMappings.xml

  5. Build the ApplinX image, for example:

    docker build -t [Image Name] .

    With this method, the Docker build copies the configuration into the image. You will need to map your ApplinX ports during startup, for example:

    docker run -p 8080:8080 -p 2323:2323 [Image Name]
  • Advantages
    Configuration changes can be persistent; you can reuse the configuration when a new version or fix is to be built. The complete configuration is in the image. For troubleshooting, Software AG Support will require only the image and the command you entered.

  • Disadvantage
    If the configuration changes, you will need to build a new image and rerun the container.

Using a Customer Application File

Start of instruction setTo use customer application file

  1. Set your working directory to <install_dir>/ApplinX/Docker.

  2. Create the TAR file containing all the necessary files with the following command:

    ./createApplinXDistributions.sh
  3. Provide your License file, for example: <install_dir>/ApplinX/Docker/License/myLicense.xml.

  4. Provide your application GXAR file, for example: <install_dir>/ApplinX/Docker/Data/yourApplication.gxar

  5. Build the ApplinX image, for example:

    docker build --build-arg APP_NAME_ARG=[Application Name] -t [Image Name] .

    With this method, the Docker build copies the configuration into the image. You will need to map your ApplinX ports during startup, for example:

    docker run -p 8080:8080 -p 2330:2330 [Image Name]
  • Advantages
    You can provide your own application file. For troubleshooting, Software AG Support will require only the image and the command you entered.

Using Customer Configuration Folders

Start of instruction setTo use customer configuration folders

  1. Set your working directory to <install_dir>/ApplinX/Docker.

  2. Create the TAR file containing all the necessary files with the following command:

    ./createApplinXDistributions.sh
  3. Provide your license folder, for example: <user_dir>/MyLicense.

  4. Provide your configuration folder, for example: <user_dir>/MyConfig.

  5. Build the ApplinX image, for example:

    docker build -t [Image Name] .

    With this method, the Docker build copies the configuration into the image. You will need to add your folders path during startup, for example:

    docker run -v <user_dir>/MyLicense:/license -v <user_dir>/MyConfig:/config -p 8080:8080 -p 2330:2330 [Image Name]
  • Advantages
    You can provide your own application file. For troubleshooting, Software AG Support will require only the image and the command you entered.

Verifying the Build

Start of instruction setTo verify the build

  1. Show the image with command

    docker images
  2. Start the docker image to be verified as described above, for example:

    run -d -p 8080:8080 -p 2380:2380 --name applinx_container_1 applinx_image_1
  3. Show the log:

    docker logs -f applinx_container_1
  4. Show the containers:

    docker ps
  5. Stop the container:

    docker stop applinx_container_1
  6. Delete the container:

    docker rm applinx_container_1
  7. Remove the image:

    docker rmi applinx_image_1