← All notes

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

Sources

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

Permanent ID: iil:note:fmyat83k

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.},
}

Markdown

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.

All artifact files (JSON index)

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.