Introduction to the Container Demonstration for the Visual COBOL Development Containers Base Image

Note: Micro Focus development containers are only available on Ubuntu platforms. See Product Information for a list of supported versions.

Development containers are a Microsoft concept that provision a fully-functioning development environment from within a container, designed to be run within Visual Studio Code.

By using development containers each developer team member can benefit from using a consistent development environment. Also, individual developers may maintain a number of development container base images, each configured for specific purposes/projects, and easily switch between different development environments on a project-by-project basis.

At the core of a development container is a Microsoft-supplied base image, which is further defined through a .devcontainers folder. This folder contains the other artifacts to be built into the container, and a devcontainers.json file to further tailor the development environment. This folder structure should be distributed to each team member and placed in their project folders to ensure a consistent development experience. Microsoft provides extensive information about how to define this folder and amend the devcontainers.json file.

To use development containers, Visual Studio Code requires the Remote Development extension pack, which includes the 'Dev Containers', 'WSL', 'Remote-SSH' and 'Remote-Tunnels' extensions that enable the container to mount source files from your local system, and allow you to work on them from within the container.

This Micro Focus product provides a demonstration that builds a feature-rich COBOL development environment into the base development container image. The supplied build scripts modify the .devcontainers folder and devcontainer.json to include the COBOL development tools and runtime stack within a development container.

As with the advice for building other COBOL container images, we recommend that you use the development container demonstration as described in Running the Development Containers Demonstration Base Image. Running the script file with the devcontainer option creates a basic development container image that is capable of launching your COBOL projects in Visual Studio Code.

If you use the demonstration script provided, once the base image is built, follow the on-screen instructions to prepare a number of example projects for use with a development container. (The example projects can be found in the DevContainers folder.)

After you have prepared these projects, you can open them in Visual Studio Code, where the .devcontainers folder structure will initiate a prompt for you to reopen them within the development container.