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 Developer Build Tools for Windows.
Before you follow the steps in this topic you must have built a base image for
Enterprise Developer Build Tools for Windows. For information on creating a base image for
Enterprise Developer Build Tools for Windows see
Building a Base Image Containing
Enterprise Developer Build Tools for Windows.
Note: Remember that
Enterprise Developer is a development and test environment so not for use in production situations. If you want to run COBOL applications in containers
in a production environment you must use containers that contain
Enterprise Server.
Before building an image containing an application to
use with
Enterprise Developer Build Tools for Windows you need to ensure that you have available the following:
- A base image for
Enterprise Developer Build Tools for Windows. If you have not yet built such an image, see
Building a Base Image Containing
Enterprise Developer Build Tools for Windows for information on how to build one.
To build an image that includes an application to
use with
Enterprise Developer Build Tools for Windows your Dockerfile needs to perform the following steps:
For users of Enterprise Developer for Eclipse:
- Specify a base image to work from. This should be an image containing only
Enterprise Developer Build Tools for Windows which was built for 32-bit or 64-bit as required and includes the additional build functionality, typically
microfocus/edbuildtools-build:win_4.0_x86or
microfocus/edbuildtools-build:win_4.0_x64.
See
Building a Base Image Containing
Enterprise Developer Build Tools for Windows 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.
- Copy the source files for your application to a folder on the image's filesystem and set the Docker working directory to that
folder.
- Perform whatever processing you need to do on your application's source file. This would typically be compiling and building
but could be anything that you can do with
Enterprise Developer Build Tools for Windows.
- Copy your built application files to the required folder on the image's filesystem and set the Docker working directory to
that folder.
- 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.
For users of Enterprise Developer UNIX Components:
- Specify a base image to work from. This should be an image containing only
Enterprise Developer Build Tools for Windows. See
Building a Base Image Containing
Enterprise Developer Build Tools for Windows for more information.
- Create a new user under which the application will run.
- Create a folder to hold the application files then copy the application files
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.
- Specify the user name to use when the image is run.
- 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 Developer 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 Developer 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 Developer 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
use with
Enterprise Developer Build Tools for Windows. 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.