Skip to content

devcontainer-feature.json Schema

Download JSON Schema

Development Container Feature Metadata

Development Container Features Metadata (devcontainer-feature.json). See https://containers.dev/implementors/features/ for more information.

Type: object(?)


Definitions

Feature

No description provided for this model.

Type: object

⚠️ Additional properties are not allowed.

PropertyTypeRequiredPossible valuesDeprecatedDefaultDescriptionExamples
idstringstringID of the Feature. The id should be unique in the context of the repository/published package where the feature exists and must match the name of the directory where the devcontainer-feature.json resides.
versionstringstringThe version of the Feature. Follows the semanatic versioning (semver) specification.
capAddarraystringPasses docker capabilities to include when creating the dev container.SYS_PTRACE
containerEnvobjectobjectContainer environment variables.
customizationsobjectobjectTool-specific configuration. Each tool should use a JSON object subproperty with a unique name to group its customizations.
descriptionstringstringDescription of the Feature. For the best appearance in an implementing tool, refrain from including markdown or HTML in the description.
documentationURLstringstringURL to documentation for the Feature.
keywordsarraystringList of strings relevant to a user that would search for this definition/Feature.
entrypointstringstringEntrypoint script that should fire at container start up.
initbooleanbooleanAdds the tiny init process to the container (—init) when the Feature is used.
installsAfterarraystringArray of ID’s of Features that should execute before this one. Allows control for feature authors on soft dependencies between different Features.
dependsOnobjectobjectAn object of Feature dependencies that must be satisified before this Feature is installed. Elements follow the same semantics of the features object in devcontainer.json
licenseURLstringstringURL to the license for the Feature.
mountsarrayMountMounts a volume or bind mount into the container.
namestringstringDisplay name of the Feature.
optionsMissing typeFeatureOptionPossible user-configurable options for this Feature. The selected options will be passed as environment variables when installing the Feature into the container.
privilegedbooleanbooleanSets privileged mode (—privileged) for the container.
securityOptarraystringSets container security options to include when creating the container.
legacyIdsarraystringArray of old IDs used to publish this Feature. The property is useful for renaming a currently published Feature within a single namespace.
deprecatedbooleanbooleanIndicates that the Feature is deprecated, and will not receive any further updates/support. This property is intended to be used by the supporting tools for highlighting Feature deprecation.
onCreateCommand['string', 'array', 'object']stringA command to run when creating the container. This command is run after “initializeCommand” and before “updateContentCommand”. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
updateContentCommand['string', 'array', 'object']stringA command to run when creating the container and rerun when the workspace content was updated while creating the container. This command is run after “onCreateCommand” and before “postCreateCommand”. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
postCreateCommand['string', 'array', 'object']stringA command to run after creating the container. This command is run after “updateContentCommand” and before “postStartCommand”. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
postStartCommand['string', 'array', 'object']stringA command to run after starting the container. This command is run after “postCreateCommand” and before “postAttachCommand”. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.
postAttachCommand['string', 'array', 'object']stringA command to run when attaching to the container. This command is run after “postStartCommand”. If this is a single string, it will be run in a shell. If this is an array of strings, it will be run as a single command without shell. If this is an object, each provided command will be run in parallel.

FeatureOption

No description provided for this model.

Type: object(?)

Mount

Mounts a volume or bind mount into the container.

Type: object

⚠️ Additional properties are not allowed.

PropertyTypeRequiredPossible valuesDeprecatedDefaultDescriptionExamples
targetstringstringMount target.
typestringbind volumeType of mount. Can be ‘bind’ or ‘volume’.
sourcestringstringMount source.