Skip to content

fix(image): add docker -> podman compatibility shim - #743

Merged
c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
bugfix/740-docker-shim
Jun 29, 2026
Merged

c-vigo merged 3 commits into
feature/625-nix-claude-migrationfrom
bugfix/740-docker-shim

Conversation

@c-vigo

@c-vigo c-vigo commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Description

The Nix-built image shipped podman but no docker binary, while the consumer .devcontainer/docker-compose.yml mounts the socket at /var/run/docker.sock and sets DOCKER_HOST/CONTAINER_HOST. Docker-out-of-Docker worked (podman honors DOCKER_HOST), but any recipe/script invoking docker literally failed with command not found.

This bakes a tiny docker -> podman wrapper at /usr/local/bin/docker (already on the baked PATH) in the bootstrap layer, so docker-literal callers get a working binary without pulling in the Docker engine.

Type of Change

  • fix -- Bug fix

Changes Made

  • flake.nix: bootstrap layer writes /usr/local/bin/docker (#!<bash> + exec <podman> "$@") and chmod +x. The store paths are Nix-interpolated; the quoted heredoc preserves $@.
  • tests/test_image.py: new TestContainerRuntime class asserting podman runs, docker resolves on PATH, and docker --version execs podman.
  • CHANGELOG.md (+ synced assets/workspace/.devcontainer/CHANGELOG.md mirror): ### Fixed entry.

Changelog Entry

Fixed

  • docker now resolves in the Nix-built image (podman compatibility shim) (#740)
    • The image shipped podman but no docker binary... the bootstrap layer now bakes a tiny docker -> podman wrapper at /usr/local/bin/docker that execs the baked podman.

Testing

  • Manual testing performed (describe below)

Manual Testing Details

Built .#devcontainerImage, loaded, tagged :test-740:

$ podman run --rm ghcr.io/vig-os/devcontainer:test-740 bash -lc 'command -v docker && docker --version'
/usr/local/bin/docker
podman version 5.8.2

New tests pass against the loaded image:

tests/test_image.py::TestContainerRuntime::test_podman_installed PASSED
tests/test_image.py::TestContainerRuntime::test_docker_shim_on_path PASSED
tests/test_image.py::TestContainerRuntime::test_docker_shim_runs_podman PASSED

Checklist

  • I have performed a self-review of my code
  • I have updated CHANGELOG.md in the [Unreleased] section
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes

Closes #740

Refs: #740

c-vigo added 3 commits June 29, 2026 12:43
The image shipped podman but no docker binary, while the consumer
docker-compose.yml mounts the socket and sets DOCKER_HOST/CONTAINER_HOST.
DooD worked because podman honors DOCKER_HOST, but any recipe/script
calling docker literally failed with "command not found". Bake a tiny
docker -> podman wrapper at /usr/local/bin/docker (already on PATH) in
the bootstrap layer so docker-literal callers get a working binary.

Refs: #740
@c-vigo
c-vigo merged commit dc7e282 into feature/625-nix-claude-migration Jun 29, 2026
10 checks passed
@c-vigo
c-vigo deleted the bugfix/740-docker-shim branch June 29, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant