Skip to content

test(devcontainer): prove the devtools devcontainer on the rootless Podman host #6471

Closed

Description

@dan-petty

Problem

#6414 builds the devcontainer image FROM the devtools image and replaces docker-in-docker with the podman-in-podman Feature (dockerCompat). CI proves the build and a start on Docker of a GitHub-hosted runner, and the agent proved a build and a start on Docker in the devcontainer. Nobody can prove the start on the owner's host from an agent session: rootless Podman on WSL2 with --userns=keep-id (uid 1000), the home volume and the runArgs of .devcontainer/devcontainer.json.

Expected

After the first release with #6414, a person rebuilds the devcontainer on that host and runs, as vscode:

  • grep VERSION_CODENAME /etc/os-release prints forky.
  • docker version prints Podman Engine, and podman --url unix:///var/run/docker.sock version shows a Server: section.
  • podman run --rm quay.io/podman/hello works.
  • The docker run steps of ci.yml (the image smoke steps) work.
  • devops docker images lists the images of the rootful store, and podman save <image> | sudo podman load copies an image from the rootless store to it.
  • git config --get-all credential.https://github.com.helper prints the empty value and then !gh auth git-credential.
  • printenv DOCKER_HOST prints unix:///var/run/docker.sock in a VS Code terminal and in an agent session.

Then remove the orphan dind-var-lib-docker-* volumes with podman volume rm.

Proof

  • Each command above exits 0 on the host, and the person records the output in a comment.

Source: #6414

Alternatives check of 2026-11-20: not-applicable.
Class: test, no search.
Tool: none found.

Proposed design

Problem statement

#6414 builds the devcontainer image FROM the devtools image and replaces docker-in-docker with the podman-in-podman Feature (dockerCompat). CI proves the build and a start on a Docker GitHub-hosted runner, but no runner holds the owner's rootless Podman host on WSL2 with --userns=keep-id, the global-devcontainer-home volume and the workspace runArgs. On 2026-11-20 the owner pulled ghcr.io/dan-petty/devops-cli/devcontainer:latest and rebuilt the devcontainer on the host; the first rebuild had read the metadata of the stale local :latest tag, and the second rebuild after the pull passed every check except the docker run image smoke steps that use --tmpfs ...:uid=1000,gid=1000, which Podman refuses with unknown mount option "uid=1000" (#6468). The owner also removed the orphan dind-var-lib-docker-* volumes. This issue records the host proof and keeps the smoke-step check until #6468 lands.

Acceptance criteria

Requirement: Devcontainer starts on the rootless Podman host

The devcontainer SHALL start on the owner's rootless Podman host on WSL2 from the released devtools-based image.

Scenario: Read the codename on the host

  • WHEN After pulling ghcr.io/dan-petty/devops-cli/devcontainer:latest on the host, the owner rebuilds the devcontainer and runs grep VERSION_CODENAME /etc/os-release as vscode.
  • THEN The command exits 0 and prints forky.

Requirement: The container starts from the published image metadata

The rebuilt container SHALL run /usr/local/share/podman-init.sh as PID 1 and use the rootless Podman store under /var/lib/containers-rootless.

Scenario: Read PID 1 and the rootless store

  • WHEN The owner runs ps -p 1 -o args= and podman info --format '{{.Store.GraphRoot}}' as vscode in the rebuilt container.
  • THEN ps prints /usr/local/share/podman-init.sh, and podman info prints /var/lib/containers-rootless/vscode.

Requirement: Docker client reaches the Podman engine

The docker client in the container SHALL reach the Podman engine through /var/run/docker.sock.

Scenario: Docker version in the container

  • WHEN The owner runs docker version and podman --url unix:///var/run/docker.sock version as vscode in the container.
  • THEN docker version prints Podman Engine, and the second command shows a Server: section.

Requirement: A container runs inside the container

podman run SHALL start a container inside the devcontainer.

Scenario: Run the hello image

  • WHEN The owner runs podman run --rm quay.io/podman/hello as vscode.
  • THEN The command exits 0.

Requirement: The image smoke steps pass in the container

The docker run image smoke steps of .github/workflows/ci.yml SHALL pass in the devcontainer once #6468 replaces the --tmpfs ...:uid=1000,gid=1000 option that Podman refuses.

Scenario: Run the service image smoke steps

Requirement: An image moves to the rootful store

The owner SHALL copy an image from the rootless store to the rootful store with podman save and sudo podman load.

Scenario: Copy an image between the stores

  • WHEN The owner runs devops docker images and then podman save quay.io/podman/hello | sudo podman load as vscode.
  • THEN devops docker images lists quay.io/podman/hello:latest of the rootful store, and the copy exits 0.

Requirement: The git credential helper stays

The container SHALL keep the empty credential helper and !gh auth git-credential.

Scenario: Read the credential helpers

  • WHEN The owner runs git config --get-all credential.https://github.com.helper as vscode.
  • THEN The command prints the empty value and then !gh auth git-credential.

Requirement: DOCKER_HOST points to the Podman socket

Each session SHALL see DOCKER_HOST=unix:///var/run/docker.sock.

Scenario: Read DOCKER_HOST in both sessions

  • WHEN The owner runs printenv DOCKER_HOST in a VS Code terminal and in an agent session.
  • THEN Both sessions print unix:///var/run/docker.sock.

Requirement: The orphan docker volumes are gone

The owner SHALL remove each orphan dind-var-lib-docker-* volume from the host with podman volume rm.

Scenario: List the volumes on the host

  • WHEN The owner runs podman volume ls on the host after removing each dind-var-lib-docker-* volume with podman volume rm.
  • THEN podman volume ls lists no dind-var-lib-docker-* volume.

Existing Tool Considered

The alternatives check of 2026-11-20 returned not-applicable for a test-class change and named no tool. The open, maintained tool that covers the need is the Dev Containers CLI (@devcontainers/cli), which the devtools image carries (.devcontainer/Dockerfile:49) and the repository's devcontainer-smoke action uses with devcontainer up and devcontainer exec (.github/actions/devcontainer-smoke/action.yml:60-.github/actions/devcontainer-smoke/action.yml:79). It starts the image as vscode and already asserts that docker version prints Podman Engine, that DOCKER_HOST is the socket, that the rootful API shows a Server: section and that the credential helpers are the empty value and !gh auth git-credential. It lacks the owner's host: the smoke action runs on a GitHub-hosted runner with Docker, and the workspace configuration cannot start there (--userns=keep-id, the global-devcontainer-home volume, --gpus all, --pids-limit=8192; .devcontainer/devcontainer.json:7, .devcontainer/devcontainer.json:132). The owner runs the live commands on the host for that part. No own code is built.

Key questions

  • How does the project prove the devcontainer start on the owner's rootless Podman host?: A person, the owner, runs the live commands on the host after pulling the published image so Dev Containers reads its metadata, and records each command and its output in a comment on this issue. The Dev Containers CLI cannot prove the host from a runner: the devcontainer-smoke action starts the image with devcontainer up and runs the same commands on a GitHub-hosted runner with Docker, and the workspace configuration (--userns=keep-id, the global-devcontainer-home volume, --gpus all) cannot start there. (best practice) [sources: .github/actions/devcontainer-smoke/action.yml:60, .github/actions/devcontainer-smoke/action.yml:79, .devcontainer/devcontainer.json:7, .devcontainer/devcontainer.json:132, docs/DEVCONTAINER_USAGE.md:53]
    • Rejected: A CI job on a GitHub-hosted runner. The runner starts Docker and holds no rootless Podman with the owner's --userns=keep-id, the home volume or the GPU.
    • Rejected: The existing devcontainer-smoke action on a GitHub-hosted runner. The action starts the image and runs the same commands, but on the runner's Docker, not on the owner's rootless Podman host.
    • Chosen: A person's live run on the owner's host. Only the owner's host holds rootless Podman with --userns=keep-id, the global-devcontainer-home volume and the GPU; the owner ran it on 2026-11-20 and recorded the results in the issue.
  • Which settings of the devcontainer must the host honour?: The image ghcr.io/dan-petty/devops-cli/devcontainer:latest; the runArgs --gpus all, --pids-limit=8192 and --sysctl=net.ipv4.ping_group_range=1000 1000; the global-devcontainer-home volume on /home/vscode; the .ssh bind mount; and the podman-in-podman:1 Feature with dockerCompat, whose remoteEnv sets DOCKER_HOST=unix:///var/run/docker.sock and the two GIT_CONFIG_* credential helpers. [sources: .devcontainer/devcontainer.json:3, .devcontainer/devcontainer.json:7, .devcontainer/devcontainer.json:8, .devcontainer/devcontainer.json:132, .devcontainer/image/devcontainer.json:16, .devcontainer/image/devcontainer.json:41, docs/DEVCONTAINER_USAGE.md:53]
  • Why do the docker run image smoke steps fail in the devcontainer?: Podman refuses the --tmpfs <path>:uid=1000,gid=1000 option, so the steps at .github/workflows/ci.yml:498 and .github/workflows/ci.yml:505 fail with unknown mount option "uid=1000"; the same option is in the Service Image Smoke Test of .github/workflows/release.yml:359 and .github/workflows/release.yml:366. Every other smoke step passes on the published service image (ci: run the image smoke steps under Podman as well as Docker #6468). [sources: .github/workflows/ci.yml:498, .github/workflows/ci.yml:505, .github/workflows/release.yml:359, openspec/changes/archive/2026-11-19-6414-devcontainer-from-devtools/proposal.md:25]
  • What does this issue do with the smoke steps that Podman refuses?: Keep the smoke-step criterion and record ci: run the image smoke steps under Podman as well as Docker #6468 as a dependency, because ci: run the image smoke steps under Podman as well as Docker #6468 changes the workflows to drop the option Podman refuses; the owner reruns the steps in the devcontainer and records the output once it lands. (best practice) [sources: .github/workflows/ci.yml:498, openspec/changes/archive/2026-11-19-6414-devcontainer-from-devtools/tasks.md:34]
  • Which store do devops docker images and sudo podman read?: The rootful store; docker, podman and docker compose as vscode use the rootless store, so podman save <image> | sudo podman load copies an image between the two. [sources: docs/DEVCONTAINER_USAGE.md:37, src/devops_cli/commands/docker.py:77]
  • Who runs the live proof on the owner's host?: The owner. The owner ran it on 2026-11-20 and recorded each result in the issue comments, including the first rebuild from the stale local :latest tag and the second rebuild after the pull. (a person decides)
  • What did the owner decide about the live proof and the remaining work?: The live proof passes on the host, the orphan dind-var-lib-docker-* volumes are removed, and the only open point is the docker run smoke steps that wait on ci: run the image smoke steps under Podman as well as Docker #6468. (a person decides)

Open questions

  • Who runs the live proof on the owner's host? (a person decides)
  • What did the owner decide about the live proof and the remaining work? (a person decides)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

#6468

Activity

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

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 19, 2026
  4. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions and Watched files in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  5. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    First rebuild on the host (2026-11-20): the container has the old metadata

    The container has the files of the new image (v0.182.3, created 2026-11-20 06:15 UTC), but Dev Containers started it with the devcontainer.metadata of the image before #6472. Podman built the container from localhost/vsc-devops-cli-<hash>-uid:latest, the UID image that Dev Containers builds over ghcr.io/dan-petty/devops-cli/devcontainer:latest.

    Evidence, as vscode in the container:

    • PID 1 runs /usr/local/share/docker-init.sh, the entrypoint of docker-in-docker. That file does not exist. The label of the published image names /usr/local/share/podman-init.sh.
    • The old volume is mounted at /var/lib/docker. The two volumes of podman-in-podman (/var/lib/containers, /var/lib/containers-rootless) are not mounted.
    • GIT_CONFIG_COUNT (in the label since fix(devcontainer): isolate image build metadata from workspace settings #2309) is set, but DOCKER_HOST (added by fix(devcontainer): build the devcontainer image FROM devtools #6472) is not.
    • So podman-init.sh did not run. /run/podman/podman.sock does not exist, and /var/run/docker.sock points to nothing.
    • Rootless podman fails: cannot set up namespace using "/usr/bin/newuidmap": exit status 1. The ID map of the container holds 0 to 65536, but /etc/subuid gives vscode:100000:65536. podman-subid-ranges.sh corrects the ranges at start, but it did not run.

    Results of the checks of this issue:

    Check Result
    grep VERSION_CODENAME /etc/os-release forky (pass)
    docker version fails: newuidmap: exit status 1
    podman --url unix:///var/run/docker.sock version fails: no socket
    git config --get-all credential.https://github.com.helper empty value, then !gh auth git-credential (pass)
    printenv DOCKER_HOST empty (fail)

    Probable cause: Dev Containers read the label of the old local :latest tag, and the UID image build used the new image. Next step: pull the image on the host, rebuild again, and run the checks again.

  6. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    Second rebuild on the host (2026-11-20): the checks pass

    Before the second rebuild, the owner pulled ghcr.io/dan-petty/devops-cli/devcontainer:latest on the host. Now PID 1 runs /usr/local/share/podman-init.sh, /run/podman/podman.sock is root:docker 0660, and /var/lib/containers and /var/lib/containers-rootless are mounted. The old volume is not mounted at /var/lib/docker.

    Check (as vscode, agent session) Result
    grep VERSION_CODENAME /etc/os-release forky
    docker version Client: Podman Engine, 5.8.6
    podman --url unix:///var/run/docker.sock version Server: Podman Engine, 5.8.6
    podman info rootless true, store /var/lib/containers-rootless/vscode
    podman run --rm quay.io/podman/hello exit 0
    podman save quay.io/podman/hello | sudo podman load exit 0
    devops docker images lists quay.io/podman/hello:latest of the rootful store
    git config --get-all credential.https://github.com.helper empty value, then !gh auth git-credential
    printenv DOCKER_HOST unix:///var/run/docker.sock
    docker run steps of the Service Image Smoke Test, on the published service image id -u, gh, git, openspec and the 3 absence checks pass. The steps with --tmpfs /home/devops:uid=1000,gid=1000 fail: unknown mount option "uid=1000" (#6468).

    Open for a person: printenv DOCKER_HOST in a VS Code terminal, and podman volume rm of the orphan dind-var-lib-docker-* volumes on the host.

  7. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    In a VS Code terminal, the owner ran printenv DOCKER_HOST. It prints unix:///var/run/docker.sock (2026-11-20).

    Still open: the docker run steps with --tmpfs ...:uid=1000,gid=1000 (#6468), and podman volume rm of the orphan dind-var-lib-docker-* volumes on the host.

  8. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    The owner removed the orphan dind-var-lib-docker-* volumes on the host (2026-11-20). The last open point of this issue is the smoke steps of #6468.

  9. devops-cli-service commented on Nov 20, 2026

    @devops-cli-service
    Contributor

    Owner question: See the first point of Open questions in the section Proposed design of the body.

    Options

    1. Decide the question: The job refines the item with your answer.
    2. Leave it to the job: The job records the best-practice answer and goes on.

    Recommendation: Decide the question: only a person can answer it.

    Evidence

  10. dan-petty commented on Nov 20, 2026

    @dan-petty
    OwnerAuthor

    All points of this issue are done (2026-11-20): the checks of the comment of the second rebuild pass, the owner checked printenv DOCKER_HOST in a VS Code terminal and removed the orphan dind-var-lib-docker-* volumes, and #6509 (#6468) made the docker run smoke steps use --tmpfs /home/devops:mode=1777, which Podman accepts. Closing as completed.

  11. removed
    status/new
    on Nov 20, 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/lowpriority/p2-mediumscope/devcontainersource/agenttype/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions