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
COBOL Server.
Before you follow the steps in this topic you must have built a base image for
COBOL Server. For information on creating a base image for
COBOL Server see
Building a Base Image Containing
COBOL Server.
Before building an image containing an application to
run under
COBOL Server you need to ensure that you have available the following:
- A base image for
COBOL Server. If you have not yet built such an image, see
Building a Base Image Containing
COBOL Server for information on how to build one.
To build an image that includes an application to
run under
COBOL Server your Dockerfile needs to perform the following steps:
- Specify a base image to work from. This should be an image containing only
COBOL Server which was built for 32-bit or 64-bit as required and includes the additional build functionality, typically
microfocus/vcbuildtools-build:win_4.0_x86 or
microfocus/vcbuildtools-build:win_4.0_x64.
See
Building a Base Image Containing
COBOL Server for more information.
- Define metadata for your image. This will make it easier to establish significant details of the image when you use the
docker inspect command.
- Define any variables for filenames and folder locations.
- Create a folder to hold the application files then copy the application files and the license file (.mflic) for
COBOL Server file into it.
- Use the
MFLicenseAdmin.exe utility to install the license for
COBOL Server.
- Perform any required clean-up. This includes tasks such as resetting variables and deleting temporary folders.
- Specify the name of the executable to run when the image is run.
The above process is used by the Docker demonstrations that create images for applications that you can
run under
COBOL 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
Hello World Docker Demonstration.