container-diff
container-diff copied to clipboard
Respect DOCKER_SOCK
Expected behavior
$ DOCKER_SOCK=$XDG_RUNTIME_DIR/podman/podman.sock container-diff analyze daemon://test
ERRO[0000] error ...
...
dial unix /run/user/1000/podman/podman.sock: connect: permission denied
Actual behavior
$ DOCKER_SOCK=$XDG_RUNTIME_DIR/podman/podman.sock container-diff analyze daemon://test
ERRO[0000] error retrieving image daemon://test: retrieving image from daemon: Got permission denied
while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get
"http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/get?names=index.docker.io%2Flibrary%2Ftest%3Alatest":
dial unix /var/run/docker.sock: connect: permission denied
Information
- container-diff version: 0.17.0
- Operating system: Fedora 35
Steps to reproduce the behavior
-
DOCKER_SOCK=$XDG_RUNTIME_DIR/podman/podman.sock container-diff analyze daemon://test
Related to #370
Works just fine if I use DOCKER_HOST
instead.
On a similar note: non-default docker context
doesn't seem to work either, as per:
- https://github.com/GoogleContainerTools/container-diff/issues/400
I can confirm that DOCKER_HOST
works as a workaround for now.