Configure options below — the preview updates in real time.

General Properties

Core dev container settings including name, features, and port forwarding.

A display name for the dev container shown in the UI.

Array of Feature IDs (without version) specifying the desired install order.

Ports to always forward from the container to the local machine (numbers or host:port strings).

Map of port numbers, ranges, or regex patterns to default port options (label, protocol, onAutoForward, etc.).

Default options for ports not explicitly configured in portsAttributes.

Environment & Users

Environment variables, user identity, and user env probing.

Name-value pairs that set environment variables for the entire container.

Name-value pairs that set environment variables only for the remote user and UI tools.

Override the user the container runs as (often root by default from the image).

Override the user that devcontainer tools and lifecycle scripts run as inside the container.

Update Remote User UIDAutomatically update the remote user UID/GID to match the local host user for bind mount permissions.

Shell type used to probe for user environment variables to include in tool processes.

Container Execution & Orchestration

Runtime behavior, privileged mode, capabilities, mounts, and host requirements.

Override CommandRun an infinite sleep command to keep the container alive instead of the default entrypoint.

Action to take when the tool window is closed.

Init ProcessPass the --init flag when creating the container to use the tini init process.
Privileged ModeRun the container in privileged mode.

Linux capabilities to add to the container.

Security options applied to the container (e.g. seccomp=unconfined).

Additional volume mounts in Docker mount string format.

Minimum number of CPU cores required on the host.

Minimum RAM required on the host (e.g. 8gb).

Minimum storage required on the host (e.g. 32gb).

Whether a GPU is required. Use true for required, "optional" for optional.

Image / Dockerfile

Settings for specifying a base image or building from a Dockerfile.

The Docker image to use for the dev container.

Path to the Dockerfile relative to devcontainer.json.

Docker build context path.

Docker image build target stage.

Build arguments passed as --build-arg to Docker.

Images to use as build cache.

Additional Docker build CLI options.

Additional Docker CLI arguments passed to the docker run command.

Override the default local mount string for the workspace (Image/Dockerfile only).

Docker Compose Specific

Settings for dev containers backed by Docker Compose.

Path(s) to Docker Compose files relative to devcontainer.json.

The main service name from the compose file to connect to.

Specific services from the compose file to start (defaults to all).

Workspace Configuration

Workspace folder path settings.

Default path that tools should open when connecting to the container.

Lifecycle Scripts

Commands executed at various stages of the dev container lifecycle.

Command to run on the local host machine before the container is created.

Command to run inside the container immediately after it is created.

Command to update workspace content (e.g. npm install).

Command to run after the container has been created and started.

Command to run every time the container starts successfully.

Command to run every time a tool or UI attaches to the container.

Which lifecycle script the tool must wait for before allowing user interaction.

VS Code Customizations

VS Code extensions and settings applied inside the dev container.

Extension IDs to install inside the dev container.

Machine-level VS Code settings as key-value pairs.