Open bzoks opened 1 year ago
bump: please make the Docker REST API endpoint configurable on CLI, so that dive can also be directly used with other engines, such as podman that support the Docker REST API; these tend to run on their own socket API paths in order to allow side-by-side co-existance.
Hi.
I have just faced with this problem. Use this environment variable to change default socket. DOCKER_HOST=unix:///home/kamil/.docker/desktop/docker.sock
Of course home catalog may be different :)
On macos, if you have Advanced/User settings ("Choose how to configure the installation of Docker's CLI tools"), you'll need to do this to make local builds work:
export DOCKER_HOST=unix:///Users/yourusername/.docker/run/docker.sock
In Docker Desktop (for Linux), when trying to analyze local image, dive doesn't use current docker context endpoint (socket), but apparently always uses "default" endpoint (
/var/run/docker.sock
), which means it fails to access images built under Docker Desktop environment. Example: Docker Desktop turned off. Built an image. I'm able to analyze it:When I start Docker Desktop (or switch docker context), this same image is still accessible by dive, even if it is not available for docker (under current context):
When listing images from current (Docker Desktop) context, listed-ones are not accessible to dive:
Output of docker context ls:
(asterix on
desktop-linux
line shows which context is current, so which will be used for all docker commands).I tried also running dive using
docker run
and mounting correct endpoint (so the one from current context), but it still didn't worked...More info on docker contexts in scope of Docker Desktop: Switch between Docker Desktop and Docker Engine