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

StatusNameDescriptionKnown Issues
๐Ÿ”ดnameHuman-friendly name for the dev container.-
๐Ÿ”ดforwardPortsPort forwarding allows exposing container ports to the host, making services accessible.#48
๐Ÿ”ดportsAttributesSet port attributes for a host:port.-
๐Ÿ”ดotherPortsAttributesOther options for ports not configured using portsAttributes.-
๐ŸŸขcontainerEnvEnvironment variables to set inside the container.-
๐ŸŸขremoteEnvOverride environment variables for tools, but not the whole container.-
๐ŸŸข*remoteUserOverride the user for tools, but not the whole container.
*Refer to choosing a target user, as behaviour may diverge from the spec.
-
๐ŸŸข*containerUserOverride the user for all operations run inside the container.
*Refer to choosing a target user, as behaviour may diverge from the spec.
-
๐Ÿ”ดupdateRemoteUserUIDUpdate the devcontainer UID/GID to match the local user.-
๐Ÿ”ดuserEnvProbeShell to use when probing for user environment variables.-
๐Ÿ”ดoverrideCommandOverride the default sleep command to be run by supporting services.-
๐Ÿ”ดshutdownActionAction to take when supporting tools are closed or shut down.-
๐Ÿ”ดinitAdds a tiny init process to the container.#221
๐Ÿ”ดprivilegedWhether the container should be run in privileged mode.-
๐Ÿ”ดcapAddCapabilities to add to the container (for example, SYS_PTRACE).-
๐Ÿ”ดsecurityOptSecurity options to add to the container (for example, seccomp=unconfined).-
๐Ÿ”ดmountsAdd additional mounts to the container.#220
๐ŸŸขfeaturesFeatures to be added to the devcontainer.-
๐Ÿ”ดoverrideFeatureInstallOrderOverride the order in which features should be installed.#226
๐ŸŸ customizationsProduct-specific properties, e.g., VS Code settings and extensions.Workaround in #43

Image or Dockerfile

StatusNameDescriptionKnown Issues
๐ŸŸขimageName of an image to run.-
๐ŸŸขbuild.dockerfilePath to a Dockerfile to build relative to devcontainer.json.-
๐ŸŸขbuild.contextPath to the build context relative to devcontainer.json.-
๐ŸŸขbuild.argsBuild args to use when building the Dockerfile.-
๐Ÿ”ดbuild.optionsBuild options to pass to the Docker daemon. Envbuilder does not use a Docker daemon, so this is not relevant.-
๐ŸŸขbuild.targetTarget to be passed when building the Dockerfile.-
๐ŸŸขbuild.cacheFromImages to use as caches when building the Dockerfile.-
๐Ÿ”ดappPortPorts to be published locally when the container is running.-
๐Ÿ”ดworkspaceMountOverrides the default local mount point for the workspace when the container is created.-
๐Ÿ”ดworkspaceFolderDefault path to open when connecting to the container.-

Docker Compose

StatusNameDescriptionKnown Issues
๐Ÿ”ดdockerComposeFilePath to a Docker Compose file related to the devcontainer.json.#236
๐Ÿ”ดserviceName of the Docker Compose service to which supporting tools should connect.#236
๐Ÿ”ดrunServicesDocker Compose services to automatically start.#236

Lifecycle Scripts

StatusNameDescriptionKnown Issues
๐Ÿ”ดinitializeCommandCommand to run on the host machine when creating the container.#395
๐ŸŸขonCreateCommandCommand to run inside container after first start.
๐ŸŸขupdateContentCommandCommand to run after onCreateCommand inside container.
๐ŸŸขpostCreateCommandCommand to run after updateContentCommand inside container.
๐ŸŸข*postStartCommandCommand 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.
๐Ÿ”ดpostAttachCommandCommand to run each time a tool attaches to the container.
๐Ÿ”ดwaitForSpecify the lifecycle command tools should wait to complete before connecting.

Minimum Host Requirements

StatusNameDescriptionKnown Issues
๐Ÿ”ดhostRequirements.cpusMinimum number of CPUs required.-
๐Ÿ”ดhostRequirements.memoryMinimum memory requirements.-
๐Ÿ”ดhostRequirements.storageMinimum storage requirements.-
๐Ÿ”ดhostRequirements.gpuWhether a GPU is required.-

Variable Substitution

StatusNameDescriptionKnown 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

StatusNameDescriptionKnown Issues
๐ŸŸขidFeature identifier-
๏ฟฝversionFeature version-
๐ŸŸขnameFeature version-
๐ŸŸขdescriptionDescription-
๐ŸŸขdocumentationURLFeature documentation URL-
๐ŸŸขlicenseURLFeature license URL-
๐ŸŸขkeywordsFeature keywords-
๐ŸŸขoptionsMap of options passed to the feature-
๐ŸŸขoptions[*].typeTypes of the option-
๐ŸŸขoptions[*].proposalsSuggested values of the option-
๐ŸŸขoptions[*].enumAllowed string values of the option-
๐ŸŸขoptions[*].defaultDefault value of the option-
๐ŸŸขoptions[*].descriptionDescription of the option-
๐ŸŸขcontainerEnvEnvironment variables to override-
๐Ÿ”ดprivilegedSet privileged mode for the container if the feature is used-
๐Ÿ”ดinitAdd tiny init when the feature is used-
๐Ÿ”ดcapAddCapabilities to add when the feature is used-
๐Ÿ”ดsecurityOptSecurity options to add when the feature is used-
๐Ÿ”ดentrypointOverride entrypoint when the feature is used-
๐Ÿ”ดcustomizationsProduct-specific properties to add when the feature is used-
๐Ÿ”ดdependsOnDefine a hard dependency on other features-
๐Ÿ”ดinstallsAfterDefine a soft dependency on other features-
๐Ÿ”ดlegacyIdsUsed when renaming a feature-
๐Ÿ”ดdeprecatedWhether the feature is deprecated-
๐Ÿ”ดmountsCross-orchestrator mounts to add to the container-