Skip to content

fix(devcontainer): the published image's metadata label stops carrying devops-cli's own mounts, lifecycle commands and editor settings into child repositories #1898

Closed

Description

@dan-petty

Friction

The published devcontainer image is a prebuild of the devops-cli workspace configuration, .devcontainer/devcontainer.json. The Dev Containers CLI writes that configuration's properties into the image label devcontainer.metadata, and every child repository that names the image reads the label. So a child gets the devops-cli workspace's own settings:

  • The named volumes devops-cli-venv, devops-cli-data, devops-cli-uv and the cache volumes, mounted on the child's own .venv, .data, .uv and cache folders. Two child repositories then share the devops-cli virtual environment and data volume.
  • global-devcontainer-home on /home/vscode.
  • postCreateCommand and postStartCommand, which run in addition to the child's own commands.
  • 18 editor extensions and the editor settings of the devops-cli workspace, among them the in-cluster ollama.endpoint, and DEVOPS_K8S_AUTO_DEPLOY=true.

A child repository that devops devcontainer init scaffolds mounts only /tmp, /home/vscode and ~/.ssh (src/devops_cli/templates/devcontainer.json.j2:39-43), so it inherits every other mount above. A child that declares the same mount targets, such as gdot-local-dev, overrides them.

Evidence

Proposed remedy

Follow the upstream two-configuration pattern. Add an image configuration, for example .devcontainer/image/devcontainer.json with its own devcontainer-lock.json, that holds the Dockerfile build, the features, remoteUser and only the container environment that every child needs. The shared action .github/actions/devcontainer-image builds that configuration. The workspace configuration keeps the devops-cli mounts, lifecycle commands and editor settings. Renovate's devcontainer manager already matches .devcontainer/<folder>/devcontainer.json. A test keeps the feature set of the two configurations equal, or the build derives one from the other.

Tests

  • The image configuration holds no mounts, no lifecycle command and no customizations.
  • The features of the image configuration equal those of the workspace configuration.
  • The shared action builds the image configuration.

Acceptance criteria

  • A child repository that names only the image gets the user vscode and the feature metadata, and no devops-cli volume, lifecycle command or editor setting.
  • uv run devops ci passes.

Activity

  1. added
    source/agent
    type/bug
    on Oct 22, 2026
  2. dan-petty commented on Oct 22, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: at intake only a critical fix goes into a release; a release start pulls Ready items in, P0 features first.

    • Type: type/bug. The candidate describes a problem with the published image's metadata label not carrying expected settings into child repositories, which is a bug fix.
    • Priority: P2-Medium. This affects the usability and consistency of devcontainer configurations across repositories, but does not block functionality or introduce security issues.
    • Value: Medium. Fixes an issue that impacts multiple child repositories inheriting incorrect or unwanted configuration settings from the parent workspace.
    • Effort: High. Requires restructuring the devcontainer setup to follow a two-configuration pattern, updating build processes and tests.
  3. added a commit that references this issue on Oct 26, 2026
    7672c71
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

    source/agenttype/bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions