Repository navigation
fix(image): add docker -> podman compatibility shim - #743
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The Nix-built image shipped
podmanbut nodockerbinary, while the consumer.devcontainer/docker-compose.ymlmounts the socket at/var/run/docker.sockand setsDOCKER_HOST/CONTAINER_HOST. Docker-out-of-Docker worked (podman honorsDOCKER_HOST), but any recipe/script invokingdockerliterally failed withcommand not found.This bakes a tiny
docker -> podmanwrapper at/usr/local/bin/docker(already on the bakedPATH) in the bootstrap layer, so docker-literal callers get a working binary without pulling in the Docker engine.Type of Change
fix-- Bug fixChanges Made
flake.nix: bootstrap layer writes/usr/local/bin/docker(#!<bash>+exec <podman> "$@") andchmod +x. The store paths are Nix-interpolated; the quoted heredoc preserves$@.tests/test_image.py: newTestContainerRuntimeclass assertingpodmanruns,dockerresolves on PATH, anddocker --versionexecs podman.CHANGELOG.md(+ syncedassets/workspace/.devcontainer/CHANGELOG.mdmirror):### Fixedentry.Changelog Entry
Fixed
dockernow resolves in the Nix-built image (podman compatibility shim) (#740)podmanbut nodockerbinary... the bootstrap layer now bakes a tinydocker -> podmanwrapper at/usr/local/bin/dockerthat execs the baked podman.Testing
Manual Testing Details
Built
.#devcontainerImage, loaded, tagged:test-740:New tests pass against the loaded image:
Checklist
CHANGELOG.mdin the[Unreleased]sectionCloses #740
Refs: #740