Building an Image Containing an Application to Run Under Enterprise Server

This topic outlines the steps that a Dockerfile must carry out to create an image that contains a COBOL application that can be run under Enterprise Server.

Before you follow the steps in this topic you must have built a base image for Enterprise Server. For information on creating a base image for Enterprise Server see Building a Base Image Containing Enterprise Server.

Before building an image containing an application to run under Enterprise Server you need to ensure that you have available the following:

To build an image that includes an application to run under Enterprise Server your Dockerfile needs to perform the following steps:

  1. Specify a base image to work from. This should be an image containing only Enterprise Server. See Building a Base Image Containing Enterprise Server for more information.
  2. Create a new user under which the application will run.
  3. Create a folder to hold the application files then copy the application files and the license file (.mflic) for Enterprise Server file into it. If you are using SUSE Linux you will need to change ownership to specify the new user as the owner of this new folder.
  4. Specify the user name to use when the image is run.
  5. Specify the name of the executable to run when the image is run.
Note: You might also want to create an image that you can log in to and execute shell or Enterprise Server commands. This option is useful if you are not adding any application files to a base image but want to be able to use Enterprise Server commands from it.

All of the Docker demonstrations offer the option to create such a login image, and those images are tagged with the suffix "_login". See Running the Docker Demonstration for the Enterprise Server Base Image for information on how to specify that you want to create a _login image. For details on the commands required to build such an image, see the bld.sh script in any of the Docker demonstrations.

The above process is used by the Docker demonstrations that create images for applications that you can run under Enterprise Server. For more information on one of those demonstrations, including information on all the files it contains and a detailed description of the Dockerfiles it contains, see The CICS Docker Demonstration.