This works(I use custom docker socket for clarity): docker -H unix:///var/opt/custom/docker.sock run -v /var/opt/custom/docker.sock:/var/run/docker.sock -e RYUK_PORT=8080 -p 8080:8080 docker.io/testcontainers/ryuk:0.5.1
This does not: podman -H unix:///run/user/1000/podman/podman.sock run -v /run/user/1000/podman/podman.sock:/var/run/docker.sock -e RYUK_PORT=8080 -p 8080:8080 docker.io/testcontainers/ryuk:0.5.1
Describe the results you received
2023/09/29 13:02:07 Pinging Docker...
panic: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/_ping": dial unix /var/run/docker.sock: connect: permission denied
goroutine 1 [running]:
main.main()
/app/main.go:131 +0x431
Describe the results you expected
$ docker -H unix:///var/opt/custom/docker.sock run -v /var/opt/custom/docker.sock:/var/run/docker.sock -e RYUK_PORT=8080 -p 8080:8080 docker.io/testcontainers/ryuk:0.5.1
2023/09/29 13:05:37 Pinging Docker...
2023/09/29 13:05:37 Docker daemon is available!
2023/09/29 13:05:37 Starting on port 8080...
2023/09/29 13:05:37 Started!
You would need to disable selinux for the container if you want to leak the podman socket, i.e. --security-opt label=disable to the podman run command.
Issue Description
Ryuk container[1] which is essential for testcontainers library can not be started when using podman.
[1] https://hub.docker.com/r/testcontainers/ryuk
Steps to reproduce the issue
This works(I use custom docker socket for clarity):
docker -H unix:///var/opt/custom/docker.sock run -v /var/opt/custom/docker.sock:/var/run/docker.sock -e RYUK_PORT=8080 -p 8080:8080 docker.io/testcontainers/ryuk:0.5.1
This does not:podman -H unix:///run/user/1000/podman/podman.sock run -v /run/user/1000/podman/podman.sock:/var/run/docker.sock -e RYUK_PORT=8080 -p 8080:8080 docker.io/testcontainers/ryuk:0.5.1
Describe the results you received
Describe the results you expected
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Podman runs on an ordinary physical machine (laptop)
Additional information
Docker is run on a cloud VM, docker info (
$ docker -H unix:///var/opt/custom/docker.sock info
) results: