Note: This topic only applies to using native COBOL applications in containers. To use
JVM COBOL applications in containers you need to use the functionality described in
Debugging and Running
JVM COBOL Applications in Containers.
Enterprise Developer lets you add a Dockerfile to a native COBOL project to simplify the process of containerizing an existing application. The
Dockerfile created by
Enterprise Developer uses default values for details such as image names and includes basic instructions in order to create an image for the native
COBOL project. If you need the Dockerfile to use non-default settings or to perform additional processing you can modify it
once
Enterprise Developer has added it to your project.
Note: As part of the Dockerfile creation process you can specify that the Dockerfile is to include commands to configure an enterprise
server, the details of which are specified in an XML file that was created either by the casesxml import/export utility or
from Server Explorer.
The XML file must be available for selection from the
Select Server Definition XML dialog box, so if you do want to use an XML file you must add it to your project before you add a Dockerfile to your project.
See
casesxml for more information on the casesxml command,
To export an enterprise server instance for information on using Server Explorer to export an enterprise server definition, and
To import a file into a project for information on adding a file to your project.
- Right-click your project in the Application Explorer view, COBOL Explorer view or Project Explorer view, and click
.
The New Dockerfile wizard is displayed.
- Select the relevant option depending on whether you want your Dockerfile to include instructions to define:
- no enterprise servers
- an enterprise server with the same configuration the one associated with this project (if there is one)
- an enterprise server whose configuration is defined in exported XML file.
If you want to use an exported XML file:
- Select
Add instructions to configure an Enterprise Server using an XML file.
- Click
Browse.
The
Select Server Definition XML dialog box is displayed.
- Navigate to the XML file that you want to use, select it, then click
OK. The XML file must be in the folder structure for the current project.
- Click
Finish.
The Dockerfile is created and opened in the Dockerfile editor. If the project already contained a Dockerfile it is renamed
to
Dockerfile.bak.