container-diff icon indicating copy to clipboard operation
container-diff copied to clipboard

Respect DOCKER_SOCK

Open abitrolly opened this issue 3 years ago • 3 comments

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

  1. DOCKER_SOCK=$XDG_RUNTIME_DIR/podman/podman.sock container-diff analyze daemon://test

Related to #370

abitrolly avatar Jan 28 '22 02:01 abitrolly

Works just fine if I use DOCKER_HOST instead.

lubo avatar Aug 06 '23 21:08 lubo

On a similar note: non-default docker context doesn't seem to work either, as per:

  • https://github.com/GoogleContainerTools/container-diff/issues/400

MPV avatar Oct 03 '23 12:10 MPV

I can confirm that DOCKER_HOST works as a workaround for now.

MPV avatar Oct 03 '23 12:10 MPV