Repository navigation
Description
Hi 👋, I am Mario, and I am a Podman maintainer.
Kudos to the team for the Dev Containers extension 🚀. It's a great project, and we look forward to collaborating to improve Podman users' UX.
For this reason, I would like to suggest a solution to run commands that require docker-in-docker, such as “Dev Containers: Try a Dev Container Sample” and “Dev Containers: Clone Repository in Container Volume…” with Podman.
Podman can currently do docker-in-docker, but requires an extra flag (--security-opt label=disable) compared to Docker:
# Fail
podman run -t --rm -v /var/run/docker.sock:/var/run/docker.sock docker:latest docker ps
# Work
podman run --security-opt label=disable -t --rm -v /var/run/docker.sock:/var/run/docker.sock docker:latest docker psDocker doesn’t mind because --security-opt label=disable is the default:
# Work
docker run -t --rm -v /var/run/docker.sock:/var/run/docker.sock docker docker:latest ps
# Work
docker run --security-opt label=disable -t --rm -v /var/run/docker.sock:/var/run/docker.sock docker:latest docker psTo address the docker-in-docker problem for Podman, without affecting Docker, you could specify --security-opt label=disable every time you mount the /var/run/docker.sock in a container. Is it something that you can change?
- VSCode Version: 1.96.4
- Local OS Version: macOS 15.3
- Remote OS Version: Fedora 41
- Remote Extension/Connection Type: Dev Containers
- Logs:
[2025-02-14T17:03:59.108Z] Start: Run in container: docker volume ls -q
[2025-02-14T17:03:59.214Z] Stop (106 ms): Run in container: docker volume ls -q
[2025-02-14T17:03:59.215Z] Start: Run: /Users/mloriedo/Git/podman/bin/darwin/podman rm -f c7f217518982d6099a73972e0ba2b8647f739f8577cecace95f8dcf716765839
[2025-02-14T17:03:59.218Z] Command failed: docker volume ls -q
[2025-02-14T17:03:59.218Z] permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.45/volumes": dial unix /var/run/docker.sock: connect: permission denied
[2025-02-14T17:03:59.218Z] Exit code 1
[2025-02-14T17:04:09.150Z] Start: Run: /Users/mloriedo/Git/podman/bin/darwin/podman volume ls -q
[2025-02-14T17:04:09.254Z] Stop (104 ms): Run: /Users/mloriedo/Git/podman/bin/darwin/podman volume ls -q
Steps to Reproduce:
- Configure Dev Containers extension to use podman as described in doc
- Open the command palette and select
Dev Containers: Try a Dev Container Sampleand select one of the samples
Does this issue occur when you try this locally?: No
Does this issue occur when you try this locally and all extensions are disabled?: No
Activity
chrmarti commentedon Feb 19, 2025
Hi Mario, thanks for investigating, this makes sense!
Fix access to socket for Podman (microsoft/vscode-remote-release#10706)
chrmarti commentedon Feb 25, 2025
This is fixed in Dev Containers 0.399.0-pre-release. A PR for the docker-outside-of-docker feature should go in soon.
l0rd commentedon Feb 25, 2025
Thank you Christof Marti (@chrmarti) I have successfully tested the Dev Containers 0.399.0-pre-release on both macOS and Windows. The commands that were failing are now working:
Dev Containers: Try a Dev Container Sample...Dev Containers: Clone Repository in Container Volume...Is the
docker-outside-of-dockerfeature this one?chrmarti commentedon Feb 25, 2025
Mario Loriedo (@l0rd) I was only looking at the one we maintain. PR: devcontainers/features#1278
Fix access to socket for Podman (microsoft/vscode-remote-release#10706)
chrmarti commentedon Mar 4, 2025
Got that also merged. Closing this issue, thanks.
l0rd commentedon Mar 4, 2025
Christof Marti (@chrmarti), we should update the documentation now that these changes have been released. If you consider it useful, I can submit a PR to address that.
chrmarti commentedon Mar 4, 2025
Mario Loriedo (@l0rd) I would appreciate that, thank you!
Update Podman documentation
Update Podman documentation
Update Podman documentation