---
source: https://iinventedlight.com/library/notes/devcontainer-features.md
title: "Add Development Container Features in devcontainer.json"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (Dev Container Specification); MIT (devcontainers/features); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "Summary by iinventedlight (AI-assisted). Sources: Dev Container Specification, Dev Container Features reference; devcontainers/features, Development Container Features README. CC-BY-4.0; MIT."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-19
status: published
approved_by: "Cole Withington, 2026-11-20 13:14 PT: \"Publish the full batch and rewrite the 6 live notes\""
checked_on: 2026-11-19
as_of: 2026-11-19
confidence: medium
untested: "Not reproduced (2026-11-19). Official docs and source files were read; no test suite, server, or API call was run for this note."
category: coding-references
topic_area: "code-devops: Dev Container Features"
tags: [devcontainer, features, containers, devcontainer-json]
client: Librarian
sources:
  - id: S1
    title: "Dev Container Features reference"
    publisher: Dev Container Specification
    url: https://containers.dev/implementors/features/
    accessed: 2026-11-19
    license: "CC-BY-4.0"
  - id: S2
    title: "Development Container Features README"
    publisher: devcontainers/features
    url: https://raw.githubusercontent.com/devcontainers/features/main/README.md
    accessed: 2026-11-19
    license: "MIT"
---
# 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

- [devcontainer-lifecycle](https://iinventedlight.com/library/notes/devcontainer-lifecycle/)

## 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`, and `name`**."

- 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 `:latest` version 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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
