devcontainer
CLI for managing development containers
TLDR
Build a dev container
SYNOPSIS
devcontainer command [options]
DESCRIPTION
devcontainer is the CLI for managing development containers defined by the Dev Container specification. It allows building, running, and interacting with containerized development environments from the command line.
Dev containers provide reproducible development environments using Docker containers. Configuration in .devcontainer/devcontainer.json defines the container image, extensions, settings, and features needed for a project.
The CLI enables dev container workflows without IDE integration, useful for CI/CD pipelines, remote development, and automation of development environment setup.
PARAMETERS
COMMAND
Operation: build, up, exec, read-configuration, features, templates.--workspace-folder PATH
Path to workspace with .devcontainer config.build
Build the dev container image.up
Create and start the container.exec COMMAND
Run command in container.read-configuration
Output resolved configuration.features list
List available dev container features.--help
Display help information.
CONFIGURATION
.devcontainer/devcontainer.json
Configuration file defining container image, features, extensions, and environment settings.
CAVEATS
Requires Docker or compatible container runtime. Configuration must follow Dev Container spec. Some features require specific base images. Resource-intensive for complex environments.
HISTORY
The Dev Container CLI was released by Microsoft as part of the Dev Containers specification (2022). It extends the VS Code Dev Containers functionality to command-line workflows and other tools.
SEE ALSO
docker(1), docker-compose(1), code(1)
