You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
$ dive 627547a71182
Image Source: docker://627547a71182
Fetching image... (this can take a while for large images)
Analyzing image...
Building cache...
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):
$ docker image inspect 627547a71182
[]
Error: No such image: 627547a71182
When listing images from current (Docker Desktop) context, listed-ones are not accessible to dive:
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
something_phpfpm-pa latest 36328f223adc 11 hours ago 114MB
$ dive 36328f223adc
Image Source: docker://36328f223adc
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull '36328f223adc'...
Using default tag: latest
Error response from daemon: pull access denied for 36328f223adc, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
cannot fetch image
exit status 1
Output of docker context ls:
$ docker context ls
NAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR
default moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock swarm
desktop-linux * moby unix:///home/bostjan/.docker/desktop/docker.sock
ecs-prod ecs
(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...
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.
I have just faced with this problem.
Use this environment variable to change default socket.
DOCKER_HOST=unix:///home/kamil/.docker/desktop/docker.sock
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:
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
The text was updated successfully, but these errors were encountered: