devcontainer-feature.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.
Property | Type | Required | Possible values | Deprecated | Default | Description | Examples |
---|---|---|---|---|---|---|---|
id | string | ✅ | string | ID 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. | |||
version | string | ✅ | string | The version of the Feature. Follows the semanatic versioning (semver) specification. | |||
capAdd | array | string | Passes docker capabilities to include when creating the dev container. | SYS_PTRACE | |||
containerEnv | object | object | Container environment variables. | ||||
customizations | object | object | Tool-specific configuration. Each tool should use a JSON object subproperty with a unique name to group its customizations. | ||||
description | string | string | Description of the Feature. For the best appearance in an implementing tool, refrain from including markdown or HTML in the description. | ||||
documentationURL | string | string | URL to documentation for the Feature. | ||||
keywords | array | string | List of strings relevant to a user that would search for this definition/Feature. | ||||
entrypoint | string | string | Entrypoint script that should fire at container start up. | ||||
init | boolean | boolean | Adds the tiny init process to the container (—init) when the Feature is used. | ||||
installsAfter | array | string | Array of ID’s of Features that should execute before this one. Allows control for feature authors on soft dependencies between different Features. | ||||
dependsOn | object | object | An 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 | ||||
licenseURL | string | string | URL to the license for the Feature. | ||||
mounts | array | Mount | Mounts a volume or bind mount into the container. | ||||
name | string | string | Display name of the Feature. | ||||
options | Missing type | FeatureOption | Possible user-configurable options for this Feature. The selected options will be passed as environment variables when installing the Feature into the container. | ||||
privileged | boolean | boolean | Sets privileged mode (—privileged) for the container. | ||||
securityOpt | array | string | Sets container security options to include when creating the container. | ||||
legacyIds | array | string | Array of old IDs used to publish this Feature. The property is useful for renaming a currently published Feature within a single namespace. | ||||
deprecated | boolean | boolean | Indicates 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'] | string | A 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'] | string | A 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'] | string | A 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'] | string | A 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'] | string | A 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.
Property | Type | Required | Possible values | Deprecated | Default | Description | Examples |
---|---|---|---|---|---|---|---|
target | string | ✅ | string | Mount target. | |||
type | string | ✅ | bind volume | Type of mount. Can be ‘bind’ or ‘volume’. | |||
source | string | string | Mount source. |