Repository navigation
Description
Problem or Motivation
.devcontainer/devcontainer.json builds the image of this repository on each workstation: it builds .devcontainer/Dockerfile and installs 7 Dev Container Features. .devcontainer/image/devcontainer.json holds the same build for the published image ghcr.io/dan-petty/devops-cli/devcontainer (#2309). The two files have the same features, the same lock file, and the same containerEnv except UV_CACHE_DIR. Each change to the image must be made two times, and each "Rebuild Container" runs apt on debian:sid and all 7 features again.
Proposed Solution & Architectural Design
Use the published image in the workspace configuration, the "prebuilt image" pattern of the Dev Containers specification (https://containers.dev/guide/prebuild):
.devcontainer/devcontainer.json: replacebuildwith"image": "ghcr.io/dan-petty/devops-cli/devcontainer:latest", the tag thatdevops devcontainer initgives child repositories. Removefeaturesand everycontainerEnventry that the image label holds. KeepUV_CACHE_DIR, the mounts,runArgs, theremoteEnvPATH, the lifecycle commands and the customizations.- Delete
.devcontainer/devcontainer-lock.json, which is equal to.devcontainer/image/devcontainer-lock.json. - Remove the five cache volumes (
.venv,.mypy_cache,.pytest_cache,.ruff_cache,.uv) andUV_CACHE_DIR. They were for a workspace on a slow Windows mount. The workspace is now on the WSL file system, on the same ext4 device as the volumes, so the volumes give no speed. All five folders are in.gitignore; post-create fills.venvagain withuv sync, and uv keeps its cache in the home volume. - Keep the mounts that hold data: the
.datavolume, the home volume, the.sshbind mount and the/tmpvolume. An invariant test fails if one of them leaves the workspace configuration. .devcontainer/image/devcontainer.jsonand the Dockerfile stay the one build definition. CI builds and smoke-tests it on each pull request that changes.devcontainerorsrc, and the release publishes it.- Add an invariant test: the workspace configuration names the published image and repeats no feature and no
containerEnventry of the image configuration. - Update
docs/DEVCONTAINER_USAGE.md: this repository uses the published image,podman pullthe tag before a rebuild to get a newer release, how to try an image change before a release, and how to remove the old cache volumes by name (never with a prune, which can remove the.dataand home volumes while no container uses them).
Evidence (2026-11-09): the devcontainer.metadata label of the published latest (v0.101.0, amd64, anonymous pull) holds all 7 features with their runtime properties (docker-in-docker: privileged, entrypoint, a mount), remoteUser: vscode, and the full containerEnv, with ${containerWorkspaceFolder} left for the container start to resolve.
Trade-offs: an image change reaches this workspace only after a release publishes it; the first post-create runs the release's devops copy before .venv takes over (as in child repositories).
Target Subsystem
devcontainer
Existing Tool Considered
The Dev Containers CLI image metadata label (devcontainer.metadata) and the prebuild pattern of the specification. The change deletes configuration and builds nothing.
Standards Compliance
- I confirm this proposal aligns with AGENTS.md engineering principles (cyclomatic complexity <= 10, nesting <= 5, zero bare exceptions, tests that cover the changed lines).
- I am willing to submit a pull request implementing this feature with accompanying tests.
Activity
dan-petty commentedon Nov 9, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
buildprefix of the title gives the type.(devcontainer)scope of the title gives the scope.It removes duplicate config and rebuild time for every developer but the current setup still works.Developers save build time and maintain one source of truth for the image, reducing drift.It edits one JSON file, deletes a lock file, adds one invariant test, and updates one doc page.Both concern the devcontainer image on GHCR, but #438 adds OCI metadata to the published image while this candidate changes the workspace config to consume that image.[-]build(devcontainer): use the published image in the workspace devcontainer[/-][+]build(devcontainer): use the published image and drop cache volumes[/+]build(devcontainer): use the published image and drop cache volumes
build(devcontainer): use the published image and drop cache volumes (#…