Skip to content

feat(devcontainer): use or build Dev Container Features for the tools #4368

Closed as not planned

Description

@dan-petty

Problem

The devcontainer image installs the tools of tools.lock with its own build steps in .devcontainer/Dockerfile (20 binaries, 2 Python tools, 2 Node tools after #4359). Dev Container Features are the standard way to add a tool to a devcontainer, and the image configuration already uses some of them (common-utils, docker-in-docker, kubectl-helm-minikube, copilot-cli, github-cli, node). A tool that a maintained Feature installs at a pinned version needs no step of ours. A child repository cannot take one tool of the image without the whole image.

Expected

For each tool and each group of tools, a decision with evidence:

  • use a published Feature, when it pins a version and checks the download;
  • build a Feature of this repository, published with the image, for the tools that no Feature covers, so that a child repository can add them to its own devcontainer.json;
  • keep a Dockerfile step, with the reason.

The change keeps the checks of today: every download is pinned and checked, and no tool installs at container creation.

Evidence

Proposed design

Problem statement

The devcontainer image installs tools with Dockerfile steps, and no per-tool decision exists. Dev Container Features are the standard way to add a tool, but a child repository cannot take one tool without the whole image. This change records one decision for each tool and Feature and implements it. It keeps every download pinned and checked and installs no tool at container creation.

Acceptance criteria

Requirement: Decision record coverage

The change SHALL write .devcontainer/image/tool-decisions.md with exactly one decision row for every tool in tools.lock and every Feature in .devcontainer/image/devcontainer.json.

Scenario: All tools and Features have one row

  • WHEN The decision record is compared with tools.lock and the image configuration
  • THEN Each tool and each Feature has exactly one row, and the row gives a decision and a reason

Requirement: Published Feature eligibility

For a tool in tools.lock, a published Feature SHALL replace a Dockerfile step only when it pins the tool version and verifies the download.

Scenario: Unpinned Feature is rejected

  • WHEN A candidate Feature does not pin the tool version or does not verify the download
  • THEN The decision record rejects the Feature and names the repository-owned Feature or Dockerfile step that replaces it

Requirement: Repository Feature options

The repository-owned Feature MUST publish as an OCI artifact, offer one boolean option for each uncovered tool, and pin by digest in .devcontainer/image/devcontainer-lock.json.

Scenario: Child repository enables one tool

  • WHEN A child repository adds the Feature at the pinned digest and enables one tool option
  • THEN The Feature install script installs only that tool at image build, without the rest of the devops-cli image

Requirement: Dockerfile exception

A Dockerfile step for a tool in tools.lock SHALL remain only when no maintained Feature covers the tool and a repository-owned Feature is not justified.

Scenario: Exception is documented

  • WHEN The decision record keeps a Dockerfile step
  • THEN The record gives the reason, and the step keeps a pinned version and a download check

Requirement: Download pin and check

Every tool download in .devcontainer/Dockerfile and in a repository-owned Feature install script SHALL use a pinned version and a checksum or signature check.

Scenario: Unpinned download fails

  • WHEN A Dockerfile step or Feature install script downloads a tool without a pinned version or a check
  • THEN The devcontainer test fails

Requirement: No install at container creation

No tool from tools.lock SHALL install at container creation.

Scenario: Container starts no installer

  • WHEN The image configuration and the post-create plan are inspected
  • THEN No lifecycle command installs a locked tool, and the post-create plan has no tool install

Existing Tool Considered

No alternatives check has run. The open, maintained Dev Container Features specification and the devcontainers/features collection cover Feature packaging, OCI distribution and lock-file pinning. They lack a maintained Feature for every tool in tools.lock and do not verify each upstream download. Building repository-owned Features for the uncovered tools costs about 12,000 tokens to write, about 3,000 tokens per later fix, and about 2 engineer-days.

Key questions

  • Which tools and Features must the decision record cover?: The record covers every tool in tools.lock and every Feature in .devcontainer/image/devcontainer.json. [sources: .devcontainer/image/devcontainer.json, .devcontainer/image/devcontainer-lock.json]
  • When may a published Feature replace a Dockerfile step?: Use a published Feature for a tool in tools.lock only when it pins the tool version and verifies the download. Otherwise use a repository-owned Feature or keep a Dockerfile step. (best practice) [sources: .devcontainer/image/devcontainer.json, .devcontainer/image/devcontainer-lock.json]
    • Chosen: Published Feature with a pinned version and a download check. It removes our step and keeps the supply-chain check.
    • Rejected: Published Feature without a pinned version or a download check. It fails the pin-and-check rule.
    • Rejected: Dockerfile step. It is the fallback only when no Feature meets the rule.
  • How should the repository package tools that no published Feature covers?: Use one repository-owned Feature with one boolean option for each uncovered tool in tools.lock. Each option defaults to false, and the image enables the options it needs. (best practice) [sources: .devcontainer/image/devcontainer.json, .devcontainer/image/devcontainer-lock.json]
    • Chosen: One Feature with per-tool options. One artifact is easier to keep, and a child repository can enable one tool.
    • Rejected: One Feature for each tool. It multiplies artifacts and release work.
    • Rejected: Keep all in the Dockerfile. A child repository still cannot take one tool.
  • How should the repository publish and pin its Feature?: Publish it as an OCI artifact in the image workflow under the repository's GHCR namespace. Pin its digest in .devcontainer/image/devcontainer-lock.json. (best practice) [sources: .devcontainer/image/devcontainer-lock.json, .github/actions/devcontainer-image/action.yml]
    • Chosen: OCI artifact pinned by digest. It is the standard distribution, and the lock file already pins Features by digest.
    • Rejected: Git repository reference. It is not a Feature distribution and gives no digest pin.
    • Rejected: Bundled tarball. It adds a custom fetch path and no standard lock.
  • When does a Dockerfile step remain?: Keep a Dockerfile step for a tool in tools.lock only when no maintained Feature meets the pin-and-check rule and a repository-owned Feature is not justified. The decision record gives the reason. (best practice) [sources: .devcontainer/image/devcontainer.json]
    • Chosen: Documented Dockerfile exception. It preserves a tool that cannot move.
    • Rejected: Remove every Dockerfile step. It would drop tools that no Feature covers.
    • Rejected: Move every tool to a Feature. It adds cost without a maintained or justified Feature.
  • How does the change keep tools out of container creation?: Install tools from tools.lock only in the image build or in Feature build steps. Add no lifecycle command that installs a locked tool. (best practice) [sources: .devcontainer/image/devcontainer.json, tests/commands/test_devcontainer.py]
    • Chosen: Build-time install only. It keeps container creation fast and offline.
    • Rejected: postCreateCommand install. It installs at container creation and can use the network.
    • Rejected: onCreateCommand install. It still runs at container creation.
  • How is the pin-and-check rule tested?: Add a devcontainer test that scans Dockerfile steps and repository-owned Feature install scripts. It fails on an unpinned download or a missing checksum or signature check. (best practice) [sources: tests/commands/test_devcontainer.py]
    • Chosen: Static scan test. It catches a regression before merge.
    • Rejected: Build-only check. A build can pass with an unchecked download.
    • Rejected: Review-only rule. It has no automated gate.
  • Where should the per-tool decision record live?: Write it to .devcontainer/image/tool-decisions.md as one table row for each tool and Feature. (best practice) [sources: .devcontainer/image/devcontainer.json, .devcontainer/image/devcontainer-lock.json]
    • Chosen: Markdown table beside the image configuration. It is easy to read, and the image test can parse its rows.
    • Rejected: JSON file. It is less readable for the reasons that a person reviews.
    • Rejected: Comments in devcontainer.json. Long reasons would crowd the image configuration.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#4359

Alternatives check of 2026-11-11: partly.
Tool: devcontainers/features (https://github.com/devcontainers/features), MIT, last activity 2026-11-10, maintained.

Activity

  1. added
    source/agent
    type/feature
    scope/devcontainer
    status/new
    value/medium
    effort/medium
    on Nov 10, 2026
  2. dan-petty commented on Nov 10, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.

    • Type: type/feature. The feat prefix of the title gives the type.
    • Scope: scope/devcontainer. The (devcontainer) scope of the title gives the scope.
    • Priority: P2-Medium. It standardises tool delivery and enables child-repo reuse, but the current Dockerfile steps already work.
    • Value: Medium. Child repositories gain the ability to adopt individual tools without the whole image.
    • Effort: Medium. Each of 20+ tools needs a use/build/keep decision, plus Feature packaging for uncovered tools.
    • Related: fix(devcontainer): the image holds the locked tools in standard locations #4359, which asks for a different change. Both manage devcontainer tool installation, but #4359 fixes where tools land in the image while the candidate changes how they are installed (Features vs Dockerfile steps).
  3. added
    priority/p2-medium
    on Nov 10, 2026
  4. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Refine cannot set this item to Ready at 120ae85 while the items below stay open. The next refine round looks at the item again when they close, or when a person replies in a comment or edits the body.

  5. added
    status/ready
    and removed
    status/new
    on Nov 10, 2026
  6. devops-cli-service commented on Nov 10, 2026

    @devops-cli-service
    Contributor

    Status set to Ready at 84d1570 (see proposed design in issue body).

  7. devops-cli-service commented on Nov 11, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Reason: The searches point to the Dev Container Features collection (devcontainers/features) as the maintained, open source of published Features, and the image already uses several of its Features (common-utils, docker-in-docker, kubectl-helm-minikube, copilot-cli, github-cli, node) that a child repository can add and pin by digest. It covers only part of the need: it publishes no Feature for every tool in tools.lock, does not verify each upstream download, and gives no per-tool use/build/keep decision, so a repository-owned Feature and Dockerfile exceptions are still needed.

    Tool: devcontainers/features (https://github.com/devcontainers/features)

    • License: MIT
    • Last activity: 2026-11-10
    • Maintained: yes

    Covers:

    • Packages a tool as a Dev Container Feature that a child repository can add to its own devcontainer.json without taking the whole image
    • Distributes Features as OCI artifacts that devcontainer.json and devcontainer-lock.json pin by digest
    • Already supplies maintained Features for several tools the image uses today (common-utils, docker-in-docker, kubectl-helm-minikube, copilot-cli, github-cli, node)

    Lacks:

    • No maintained Feature for each of the ~20 tools in tools.lock, so uncovered tools still need a repository-owned Feature or a Dockerfile step
    • Its Features do not verify each upstream tool download against a pinned checksum or signature
    • No per-tool decision record mapping each tool and Feature to use/build/keep with a reason
    • No repository-owned Feature artifact offering one boolean option per uncovered tool

    Tools considered:

    Searches run:

    • Dev Container Features collection devcontainers/features official, results: 5
    • install CLI tools via Dev Container Feature pinned version checksum, results: 5
    • devcontainer.json features ghcr.io/devcontainers/features, results: 5
    • "Dev Container Features" specification containers.dev features distribute OCI, results: 5
    • github devcontainers/features repository, results: 5
    • containers.dev features documentation, results: 5
    • devcontainer feature template publish OCI artifact pin digest devcontainer-lock.json, results: 5
    • devcontainer features index list of available features tools, results: 5
    • "dev container feature" install CLI tool checksum verification option version pin, results: 5
    • devcontainer feature mise asdf install multiple tools pinned versions, results: 5

    Sources:

    Checked on 2026-11-11. A person decides what this means for the item. The check changes no label and closes no issue.

  8. dan-petty commented on Nov 19, 2026

    @dan-petty
    OwnerAuthor

    Closed as not planned. Owner decision of 2026-11-19: the devtools image (dan-petty/devtools#1) gives the tools: apt where Debian sid is current, else mise with mise.lock, Python tools through uv, and Node tools from one package.json and lock. The devcontainer image builds FROM it by digest (#6414), so no Dev Container Features for the tools are needed. Renovate's built-in mise manager keeps the versions current (#6402).

  9. removed
    status/ready
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/mediumpriority/p2-mediumscope/devcontainersource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions