Skip to content

test(devcontainer): start Minikube in the devcontainer with Podman #6466

Done

Description

@dan-petty

Problem

The devcontainer image of #6414 has no Docker engine and no Docker CLI. docker is podman-docker, which runs rootless Podman, and /var/run/docker.sock is the socket of a rootful Podman API service (podman-in-podman Feature with dockerCompat). devops devcontainer post-start starts Minikube in the background with --driver=docker when k8s.context is minikube, the default (src/devops_cli/commands/devcontainer.py, _run_k8s_bootstrap_worker; src/devops_cli/commands/k8s/cluster_runtime.py). Nobody tested this driver against podman-docker, and nobody tested the podman driver of Minikube in the devcontainer. The start is in the background and only writes a warning when it fails, so a failure is easy to miss.

Expected

  • In the devcontainer of fix(devcontainer): build the devcontainer image FROM devtools #6414, devops k8s switch-context minikube starts a Minikube cluster that kubectl get nodes shows as Ready, with the driver that works with Podman (docker through the rootful socket, or podman).
  • docs/DEVCONTAINER_USAGE.md (Topology 1) names the driver, and the #MINIKUBE_ISSUE links there point to this issue.

Proof

Source: #6414

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

Proposed design

Problem statement

Set DOCKER_HOST=unix:///var/run/docker.sock for the Minikube docker driver start in the devcontainer. Keep the live check on the owner's rootless Podman host and on Docker as the merge gate. The devcontainer image from #6414 has podman-docker and a rootful Podman API socket at that path. The current bootstrap starts Minikube in the background with an untested driver and only warns when it fails. This change adds an offline test for the driver and socket. It updates docs/DEVCONTAINER_USAGE.md Topology 1 and replaces each #MINIKUBE_ISSUE placeholder with #6466.

Acceptance criteria

Requirement: Minikube driver and socket

The devcontainer bootstrap SHALL start Minikube with the docker driver and set DOCKER_HOST=unix:///var/run/docker.sock when k8s.context is minikube.

Scenario: Bootstrap uses the rootful Podman socket

  • WHEN uv run pytest tests/commands/test_devcontainer.py -k minikube_driver runs with a mocked subprocess.
  • THEN The test passes and asserts the Minikube command has --driver=docker and the environment has DOCKER_HOST=unix:///var/run/docker.sock.

Requirement: Devcontainer guide names the driver

docs/DEVCONTAINER_USAGE.md SHALL name the docker driver and the rootful Podman socket in Topology 1.

Scenario: Guide names the driver and socket

  • WHEN uv run pytest tests/docs/test_docs.py -k devcontainer_usage_driver runs.
  • THEN The test passes and asserts the Topology 1 section has --driver=docker and /var/run/docker.sock.

Requirement: Issue link replacement

Each #MINIKUBE_ISSUE placeholder in docs/DEVCONTAINER_USAGE.md SHALL point to issue #6466.

Scenario: Placeholder links resolve to the issue

  • WHEN uv run pytest tests/docs/test_docs.py -k minikube_issue_link runs.
  • THEN The test passes and asserts the file has no #MINIKUBE_ISSUE text and has #6466.

Requirement: Live Minikube start

In the devcontainer, devops k8s switch-context minikube MUST start a Minikube cluster that kubectl get nodes shows Ready.

Scenario: Live devcontainer check

  • WHEN A person runs devops k8s switch-context minikube in the devcontainer on the owner's rootless Podman host and on Docker.
  • THEN kubectl get nodes shows the Minikube node with status Ready.

Existing Tool Considered

Minikube is the open, maintained tool that covers the local Kubernetes cluster start. The alternatives block in the issue body records not-applicable for this test item and no alternative tool. This change tests the Minikube docker driver and adds no replacement tool.

Key questions

  • Which Minikube driver should the devcontainer use when k8s.context is minikube?: Use the docker driver and set DOCKER_HOST=unix:///var/run/docker.sock for the Minikube start. (best practice) [sources: src/devops_cli/commands/devcontainer.py:935, src/devops_cli/commands/k8s/cluster_runtime.py]
    • Chosen: docker driver with the rootful Podman socket. The docker driver is stable. The rootful Podman service exposes the Docker API on that socket.
    • Rejected: podman driver. It adds a second driver path. The devcontainer already exposes a Docker-compatible socket.
    • Rejected: docker driver with the default podman-docker CLI. The default docker CLI is rootless. It can use the wrong Podman instance.
  • How should the test verify the driver without the owner's host?: Mock run_subprocess in tests/commands/test_devcontainer.py and assert the Minikube command and environment. (best practice) [sources: tests/commands/test_devcontainer.py, src/devops_cli/commands/devcontainer.py:935]
    • Chosen: Unit test with a mocked subprocess. It runs offline and checks the exact driver and socket.
    • Rejected: Live devcontainer only. It needs the owner's host and is not repeatable in CI.
  • Where should the documentation name the driver and link this issue?: In docs/DEVCONTAINER_USAGE.md Topology 1, and replace each #MINIKUBE_ISSUE placeholder with #6466. (best practice) [sources: docs/DEVCONTAINER_USAGE.md]
    • Chosen: Update docs/DEVCONTAINER_USAGE.md. The issue names that guide and Topology 1.
    • Rejected: Add a separate document. It would split the devcontainer guidance.

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/test
    source/agent
    status/new
    value/medium
    effort/medium
    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 19, 2026

    @devops-cli-service
    Contributor

    Next step: the alternatives check records a verdict. See the section Proposed design of the body.

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

    @devops-cli-service
    Contributor

    Next step: the stage job writes the plan of the item. See the section Proposed design of the body.

  7. added
    status/in-progress
    status/in-review
    and removed
    status/ready
    status/in-progress
    on Nov 25, 2026
  8. removed
    status/in-review
    on Nov 25, 2026
  9. devops-cli-service commented on Nov 25, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-25 08:43 UTC

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/testvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions