Add Development Container Features in devcontainer.json
Answer: Development Container Features are self-contained, shareable units of installation code and development container configuration. Features are referenced in a user's devcontainer.json under the top level features object. Each Feature has its own folder. That folder always includes devcontainer-feature.json and an install.sh entrypoint script.
All properties are optional except for id, version, and name. Additional files are permitted and are packaged along side the required files. Features can be installed on top of many base images. A Feature's implementation might still restrict it to a subset of those images, such as debian-based images that use the apt package manager.
The features object
Each Feature is a key/value pair. The key is the Feature identifier, and the value is an object of "options" (or empty for "default"). As a shorthand, that value can be a single string, which is mapped to an option called version. The :latest version annotation is added implicitly if omitted.
The devcontainers/features README shows identifiers such as ghcr.io/devcontainers/features/go:1 and ghcr.io/devcontainers/features/docker-in-docker:1 on mcr.microsoft.com/devcontainers/base:ubuntu. You can pin :1, :1.0, or :1.0.0. The devcontainer CLI can build a workspace that declares Features.
| features | devcontainer-feature.json | |---|---| | devcontainer.json | id | | Feature identifier | version | | options | name | | install.sh | install.sh | | :latest | id | | ghcr.io/devcontainers/features/go:1 | version |
See also
Claims
- id: C1 claim: Features are self-contained units of installation code and dev container configuration, referenced under features in devcontainer.json. source: S1 evidence: "Features are referenced in a user's [
devcontainer.json]"
- id: C2 claim: A Feature directory must include devcontainer-feature.json with id, version, and name, plus install.sh. source: S1 evidence: "All properties are optional except for
id,version, andname."
- id: C3 claim: The features repository documents OCI ids such as ghcr.io/devcontainers/features/go:1 and implicit :latest tags. source: S2 evidence: "The
:latestversion annotation is added implicitly if omitted."
Sources
- [S1] Dev Container Features reference. Dev Container Specification. https://containers.dev/implementors/features/ . License: CC-BY-4.0. Accessed 2026-11-19.
- [S2] Development Container Features README. devcontainers/features. https://raw.githubusercontent.com/devcontainers/features/main/README.md . License: MIT. Accessed 2026-11-19.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Dev Container Specification, Dev Container Features reference; devcontainers/features, Development Container Features README. CC-BY-4.0; MIT. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Dev Container Specification, Dev Container Features reference; devcontainers/features, Development Container Features README. CC-BY-4.0; MIT.
Cite this
iinventedlight. 2026. "Add Development Container Features in devcontainer.json." iinventedlight Library, iil:note:fmyat83k, version of 2026-11-19. https://iinventedlight.com/library/notes/devcontainer-features/. License: CC-BY-4.0.
@misc{iil_note_fmyat83k,
author = {{iinventedlight}},
title = {{Add Development Container Features in devcontainer.json}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-19},
url = {https://iinventedlight.com/library/notes/devcontainer-features/},
note = {Permanent ID iil:note:fmyat83k. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- devcontainer-features.table.json (table; CC-BY-4.0)
- devcontainer-features.schema.json (schema; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/devcontainer-features.md.