The Dockerfile.dndebug File in the Hello World Docker Demonstration

This topic lists and describes the Dockerfile.dndebug file from the Hello World Docker demonstration. The Dockerfile is listed in its entirety and a following table describes the various Dockerfile commands. The line numbers in the listings of the Dockerfile have been added to aid readability. They are not present in the supplied Dockerfile.

Note: You must be using Visual Studio 2017 (or later) to be able to debug a managed COBOL application running in a Docker container. See Debugging Managed COBOL Applications Running in Containers for more information.
001  # Copyright (C) Micro Focus 2018. All rights reserved. 
002  # This sample code is supplied for demonstration purposes only
003  # on an "as is" basis and is for use at your own risk. 
004  
005  ARG DTAG=win_4.0
006  FROM microfocus/vcbuildtools-build:${DTAG}
007  
008  ARG PLATFORM
009  
010  # optional arguments
011  ARG APPDIR=c:\\app
012  
013  # install visual studio remote tools and setup PATH to msvsmon
014  WORKDIR "${APPDIR}"
015  COPY VS_RemoteTools.exe "${APPDIR}\\"
016  RUN VS_RemoteTools.exe /install /quiet /norestart && \
017      del VS_RemoteTools.exe && \
018      setx /M PATH "%PATH%;C:\\Program Files\\Microsoft Visual Studio 15.0\\Common7\\IDE\\Remote Debugger\\x64"
019  
020  # set the start directory
021  WORKDIR "${APPDIR}"
022  EXPOSE 4022 4023
023  CMD msvsmon.exe /nostatus /silent /noauth /anyuser /nosecuritywarn

The commands on the lines in this Dockerfile are as follows:

Lines Description
005 - 006 Specifies the base image to use, which is the Visual COBOL base image.
008 - 011 Define build arguments passed by the docker build command:
  • ESPLATFORM. Either x86 or x64 indicating whether the CICS application will be running in a 32-bit or 64-bit environment respectively.
  • APPDIR. Specifies the folder in the image's filesystem that the CICS application is copied into. c:\app is used if this argument is not specified.
014 Sets the Docker working directory to be the folder for the Hello World application in the image's filesystem.
015 - 018 Copy and set up the Visual Studio remote tools that are required to be able to debug managed COBOL running in a container. You will need to modify this Dockerfile so that it also copies the file MicroFocus.COBOL.ExpressionEvaluator.Remote.dll which is supplied with Visual COBOL. See Debugging Managed COBOL Applications Running in Containers for more information on MicroFocus.COBOL.ExpressionEvaluator.Remote.dll.
021 Sets the Docker working directory to be the folder for the Hello World application in the image's filesystem.
022 Specifies the network ports that the container will listen on at run-time.
023 Runs the Visual Studio remote debugger. This is required to be able to debug managed COBOL running in a container.