The top-level approach to creating development images to work with COBOL applications is as follows:
As described in Create Different Images for Different Development Tasks, you might want to consider creating a small number of base images rather than just one.
Using this approach, you first need to build your application locally using Visual COBOL to create the executable files and the files that are required in order to debug the application. You then run your Visual COBOL Development Hub base image in a container using the -v option to make available the debug files that you created.
The -v option to the docker run command specifies a volume to be mounted. This mounts a specified directory on your computer into a specified directory in the container, meaning that the running container has access to the files in the specified directory on your computer. The folder you need to specify on your computer is the folder into which Visual COBOL created the debug files for your application.
Using volume mounts in this way is very convenient when debugging as it enables you to make changes to your source code, rebuild the application, then test the changes running in a container without the overhead of creating a new image.
Using this approach, the Dockerfile for the image must contain the commands that are required to create the executable files and the files that are required in order to debug the application. Once you have created your application-specific image you can then run it in a container and connect your debugger to that container.