Support for Dev Container Specification
November 6, 2024 ยท View on GitHub
Refer to the full Dev Container specification here for more information on the below options.
The symbols in the first column indicate the support status:
- ๐ข Fully supported.
- ๐ Partially supported.
- ๐ด Not currently supported.
The last column indicates any currently existing GitHub issue for tracking support for this feature. Feel free to create a new issue if you'd like Envbuilder to support a particular feature.
General
| Status | Name | Description | Known Issues |
|---|---|---|---|
| ๐ด | name | Human-friendly name for the dev container. | - |
| ๐ด | forwardPorts | Port forwarding allows exposing container ports to the host, making services accessible. | #48 |
| ๐ด | portsAttributes | Set port attributes for a host:port. | - |
| ๐ด | otherPortsAttributes | Other options for ports not configured using portsAttributes. | - |
| ๐ข | containerEnv | Environment variables to set inside the container. | - |
| ๐ข | remoteEnv | Override environment variables for tools, but not the whole container. | - |
| ๐ข* | remoteUser | Override the user for tools, but not the whole container. *Refer to choosing a target user, as behaviour may diverge from the spec. | - |
| ๐ข* | containerUser | Override the user for all operations run inside the container. *Refer to choosing a target user, as behaviour may diverge from the spec. | - |
| ๐ด | updateRemoteUserUID | Update the devcontainer UID/GID to match the local user. | - |
| ๐ด | userEnvProbe | Shell to use when probing for user environment variables. | - |
| ๐ด | overrideCommand | Override the default sleep command to be run by supporting services. | - |
| ๐ด | shutdownAction | Action to take when supporting tools are closed or shut down. | - |
| ๐ด | init | Adds a tiny init process to the container. | #221 |
| ๐ด | privileged | Whether the container should be run in privileged mode. | - |
| ๐ด | capAdd | Capabilities to add to the container (for example, SYS_PTRACE). | - |
| ๐ด | securityOpt | Security options to add to the container (for example, seccomp=unconfined). | - |
| ๐ด | mounts | Add additional mounts to the container. | #220 |
| ๐ข | features | Features to be added to the devcontainer. | - |
| ๐ด | overrideFeatureInstallOrder | Override the order in which features should be installed. | #226 |
| ๐ | customizations | Product-specific properties, e.g., VS Code settings and extensions. | Workaround in #43 |
Image or Dockerfile
| Status | Name | Description | Known Issues |
|---|---|---|---|
| ๐ข | image | Name of an image to run. | - |
| ๐ข | build.dockerfile | Path to a Dockerfile to build relative to devcontainer.json. | - |
| ๐ข | build.context | Path to the build context relative to devcontainer.json. | - |
| ๐ข | build.args | Build args to use when building the Dockerfile. | - |
| ๐ด | build.options | Build options to pass to the Docker daemon. Envbuilder does not use a Docker daemon, so this is not relevant. | - |
| ๐ข | build.target | Target to be passed when building the Dockerfile. | - |
| ๐ข | build.cacheFrom | Images to use as caches when building the Dockerfile. | - |
| ๐ด | appPort | Ports to be published locally when the container is running. | - |
| ๐ด | workspaceMount | Overrides the default local mount point for the workspace when the container is created. | - |
| ๐ด | workspaceFolder | Default path to open when connecting to the container. | - |
Docker Compose
| Status | Name | Description | Known Issues |
|---|---|---|---|
| ๐ด | dockerComposeFile | Path to a Docker Compose file related to the devcontainer.json. | #236 |
| ๐ด | service | Name of the Docker Compose service to which supporting tools should connect. | #236 |
| ๐ด | runServices | Docker Compose services to automatically start. | #236 |
Lifecycle Scripts
| Status | Name | Description | Known Issues |
|---|---|---|---|
| ๐ด | initializeCommand | Command to run on the host machine when creating the container. | #395 |
| ๐ข | onCreateCommand | Command to run inside container after first start. | |
| ๐ข | updateContentCommand | Command to run after onCreateCommand inside container. | |
| ๐ข | postCreateCommand | Command to run after updateContentCommand inside container. | |
| ๐ข* | postStartCommand | Command to run each time the container is started. *This may be specified by ENVBUILDER_POST_START_SCRIPT, in which case it is the responsibility of ENVBUILDER_INIT_COMMAND to run it. | |
| ๐ด | postAttachCommand | Command to run each time a tool attaches to the container. | |
| ๐ด | waitFor | Specify the lifecycle command tools should wait to complete before connecting. |
Minimum Host Requirements
| Status | Name | Description | Known Issues |
|---|---|---|---|
| ๐ด | hostRequirements.cpus | Minimum number of CPUs required. | - |
| ๐ด | hostRequirements.memory | Minimum memory requirements. | - |
| ๐ด | hostRequirements.storage | Minimum storage requirements. | - |
| ๐ด | hostRequirements.gpu | Whether a GPU is required. | - |
Variable Substitution
| Status | Name | Description | Known Issues |
|---|---|---|---|
| ๐ข | ${localEnv:VARIABLE_NAME} | Environment variable on the host machine. | - |
| ๐ข | ${containerEnv:VARIABLE_NAME} | Existing environment variable inside the container. | - |
| ๐ข | ${localWorkspaceFolder} | Path to the local workspace folder. | - |
| ๐ข | ${containerWorkspaceFolder} | Path to the workspace folder inside the container. | - |
| ๐ข | ${localWorkspaceFolderBasename} | Base name of localWorkspaceFolder. | - |
| ๐ข | ${containerWorkspaceFolderBasename} | Base name of containerWorkspaceFolder. | - |
| ๐ด | ${devcontainerId} | A stable unique identifier for the devcontainer. | - |
Features
| Status | Name | Description | Known Issues |
|---|---|---|---|
| ๐ข | id | Feature identifier | - |
| ๏ฟฝ | version | Feature version | - |
| ๐ข | name | Feature version | - |
| ๐ข | description | Description | - |
| ๐ข | documentationURL | Feature documentation URL | - |
| ๐ข | licenseURL | Feature license URL | - |
| ๐ข | keywords | Feature keywords | - |
| ๐ข | options | Map of options passed to the feature | - |
| ๐ข | options[*].type | Types of the option | - |
| ๐ข | options[*].proposals | Suggested values of the option | - |
| ๐ข | options[*].enum | Allowed string values of the option | - |
| ๐ข | options[*].default | Default value of the option | - |
| ๐ข | options[*].description | Description of the option | - |
| ๐ข | containerEnv | Environment variables to override | - |
| ๐ด | privileged | Set privileged mode for the container if the feature is used | - |
| ๐ด | init | Add tiny init when the feature is used | - |
| ๐ด | capAdd | Capabilities to add when the feature is used | - |
| ๐ด | securityOpt | Security options to add when the feature is used | - |
| ๐ด | entrypoint | Override entrypoint when the feature is used | - |
| ๐ด | customizations | Product-specific properties to add when the feature is used | - |
| ๐ด | dependsOn | Define a hard dependency on other features | - |
| ๐ด | installsAfter | Define a soft dependency on other features | - |
| ๐ด | legacyIds | Used when renaming a feature | - |
| ๐ด | deprecated | Whether the feature is deprecated | - |
| ๐ด | mounts | Cross-orchestrator mounts to add to the container | - |