dive: Dive don't find local images with docker desktop
What happened: I’m unable to fetch for local images using dive
What you expected to happen: I expect to be able to inspect images locally
How to reproduce it (as minimally and precisely as possible): Just install latest dive and docker version, build an image and try to inspect it
Environment:
- OS version : Ubuntu 22.04
- Docker version (if applicable): Docker version 27.0.3, build 7d4bcd8
- Dive version : 0.12.0
Here is what it look like :
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
work-database latest c777209c4241 6 days ago 796MB
work-frontend latest ba1bcaf3bdb9 5 weeks ago 150MB
work-backend latest d4f717757028 5 weeks ago 129MB
dive work-database:latest
Image Source: docker://work-database:latest
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull 'work-database:latest'...
Error response from daemon: Get "https://registry-1.docker.io/v2/": dialing registry-1.docker.io:443 container via direct connection because has no HTTPS proxy: resolving host registry-1.docker.io: lookup registry-1.docker.io on 127.0.0.53:53: no such host
cannot fetch image
exit status 1
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 16
- Comments: 22 (4 by maintainers)
Commits related to this issue
- Update README.md with DOCKER_HOST env var instructions I had an error pulling local images. Setting the DOCKER_HOST env var fixed this problem for me. This has has been mentioned in issues such as ht... — committed to benjamin-brady/dive by benjamin-brady 2 years ago
- Update README.md with DOCKER_HOST env var instructions (#565) I had an error pulling local images. Setting the DOCKER_HOST env var fixed this problem for me. This has has been mentioned in issues suc... — committed to wagoodman/dive by benjamin-brady 2 years ago
I’m running
dive0.12.0 with the latest Docker Desktop 4.33.0 on Intel-based macOS 14.5, and I can reproduce this exact issue.Through some experimentation, I’ve narrowed down to having to set the
DOCKER_HOSTenvironment variable before running dive on local images:Hope this helps.
For those who use OrbStack on MacOS,
to make it work run
export DOCKER_HOST=$(docker context inspect -f '{{ .Endpoints.docker.Host }}')I have this issue as well on MacOS w/ Docker Desktop,
docker images lsdoes correctly list my images, but dive doesn’t find them… I noticed that there are 2 contexts when Idocker context ls:DOCKER_HOSTisn’t set in my environmentdiveit will fetch docker hub images that are already present locally in mydocker images, and it won’t find local images I’ve built.DOCKER_HOSTvar,DOCKER_HOST=$(docker context inspect -f '{{ .Endpoints.docker.Host }}') dive btop-docker:hcy9ccb27a0470pablkxx7sxpbp88gfpit finds my local imagesSeems like
diveis assuming the default (unix:///var/run/docker.sock) whenDOCKER_HOSTisn’t defined when perhaps it should be askingdocker, either that or Docker Desktop should be definingDOCKER_HOST.This doesn’t work for me unfortunately 😦
I have the same issue on a Mac with Docker Desktop
That looks like #546.
I could also not scan local images with dive 0.12.0 installed from snap on Ubuntu 24.04 with Docker 27.1.1.
I switched to the dive alias from the README that runs dive from a docker image instead, and that finds my local images.
Pls it is clearly not related to the issue I made can you open another issues.
I don’t have any other ideas unfortunately, but it’s highly unlikely
divedeleted your images.I had a lot of local docker images but after I installed dive via
sudo snap install divethey are gone 😮