Supporting tools and services

This page outlines tools and services that currently support the development container specification, including the devcontainer.json format. A devcontainer.json file in your project tells tools and services that support the dev container spec how to access (or create) a dev container with a well-defined tool and runtime stack.

While most dev container properties apply to any devcontainer.json supporting tool or service, a few are specific to certain tools, which are outlined below.

Editors

Visual Studio Code

Visual Studio Code specific properties go under vscode inside customizations.

"customizations": {
		// Configure properties specific to VS Code.
		"vscode": {
			// Set *default* container specific settings.json values on container create.
			"settings": {},
			"extensions": [],
		}
}
Property Type Description
extensions array An array of extension IDs that specify the extensions that should be installed inside the container when it is created. Defaults to [].
settings object Adds default settings.json values into a container/machine specific settings file. Defaults to {}.

Please note that Dev Containers and GitHub Codespaces support the VS Code properties.

Visual Studio

Visual Studio added Dev Container support in Visual Studio 2022 17.4 for C++ projects using CMake Presets. It is part of the Linux and embedded development with C++ workload, so make sure it is selected in your VS installation. Visual Studio manages the lifecycle of Dev Containers it uses as you work, but it treats them as remote targets in a similar way to other Linux or WSL targets.

You may learn more in the announcement blog post.

Tools

Dev container CLI

A dev container command line interface (CLI) that implements this specification. It is in development in the devcontainers/cli repo.

The CLI can take a devcontainer.json and create and configure a dev container from it. It allows for prebuilding dev container definitions using a CI or DevOps product like GitHub Actions. It can detect and include dev container features and apply them at container runtime, and run lifecycle commands like postCreateCommand, providing more power than a plain docker build and docker run.

VS Code extension CLI

VS Code has a CLI which may be installed within the Dev Containers extension or through the command line.

Visual Studio Code Dev Containers

The Visual Studio Code Dev Containers extension lets you use a Docker container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code’s full feature set. There is more information in the Dev Containers documentation.

Tip: If you make a change to your dev container after having built and connected to it, be sure to run Dev Containers: Rebuild Container from the Command Palette (kbstyle(F1)) to pick up any changes you make.

Product specific properties

The Dev Containers extension implements the VS Code properties specific properties.

Product specific limitations

Some properties may also have certain limitations in the Dev Containers extension.

Property or variable Type Description
workspaceMount string Not yet supported when using Clone Repository in Container Volume.
workspaceFolder string Not yet supported when using Clone Repository in Container Volume.
${localWorkspaceFolder} Any Not yet supported when using Clone Repository in Container Volume.
${localWorkspaceFolderBasename} Any Not yet supported when using Clone Repository in Container Volume.

GitHub Codespaces

A codespace is a development environment that’s hosted in the cloud. Codespaces run on a variety of VM-based compute options hosted by GitHub.com, which you can configure from 2 core machines up to 32 core machines. You can connect to your codespaces from the browser or locally using Visual Studio Code.

Tip: If you make a change to your dev container after having built and connected to your codespace, be sure to run Codespaces: Rebuild Container from the Command Palette (kbstyle(F1)) to pick up any changes you make.

Tip Codespaces implements an auto workspaceFolder mount in Docker Compose scenarios.

Product specific properties

GitHub Codespaces works with a growing number of tools and, where applicable, their devcontainer.json properties. For example, connecting the Codespaces web editor or VS Code enables the use of VS Code properties.

If your Codespaces project needs additional permissions for other repositories, you can configure this through the repositories and permissions properties. You may learn more about this in the Codespaces documentation. As with other tools, Codespaces specific properties are placed within a codespaces namespace inside the customizations property.

"customizations": {
		// Configure properties specific to Codespaces.
		"codespaces": {
			"repositories": {
				"my_org/my_repo": {
					"permissions": {
						"issues": "write"
					}
				}
			}
		}
}

Product specific limitations

Some properties may apply differently to Codespaces.

Property or variable Type Description
mounts array Codespaces ignores “bind” mounts with the exception of the Docker socket. Volume mounts are still allowed.
workspaceMount string Not yet supported in Codespaces.
workspaceFolder string Not yet supported in Codespaces.
forwardPorts array Codespaces does not yet support the "host:port" variation of this property.
portsAttributes object Codespaces does not yet support the "host:port" variation of this property.
shutdownAction enum Does not apply to Codespaces.
${localEnv:VARIABLE_NAME} Any For Codespaces, the host is in the cloud rather than your local machine.
waitFor enum Codespaces does not yet support waitFor.

Schema

You can explore the VS Code implementation of the dev container schema.