Broken since docker 26
What happened:
Github ubuntu 20.04 updated the docker version from 24 to 26
What you expected to happen:
dive continued to work
How to reproduce it (as minimally and precisely as possible):
Run dive with docker 26
Anything else we need to know?:
Environment:
- OS version
- Docker version (if applicable)
Fetching image... (this can take a while for large images)
cannot fetch image
could not find 'blobs/sha256/whatever' in parsed layers
For me this seems to be related to containerd storage engine. I think it broke as I switched to it.
I agree re. containerd storage engine. I had containerd enabled on Docker Desktop with Docker v26.1.4 on Windows 11 with WSL2 - it was broken with containerd enabled but disabling containerd fixed it. It would be helpful if it was compatible with containerd though.
Anyone know how to download and run a earlier docker version on mac? Brew only has the latest version. I tried downloading from https://download.docker.com/mac/static/stable/aarch64/but got "“docker” can’t be opened because Apple cannot check it for malicious software. when I tried running it.
ah found the install instructions: https://docs.docker.com/engine/install/binaries/
In my case running xattr -rc docker fixed the error I was getting
Disabling containerd in Docker Desktop settings on OSX has fixed it for me. (With latest version of Docker Desktop : Docker version 27.0.2, build 912c1ddf8a) But it would be ideal to be compatible with containerd too.
The issue is the heuristic here is broken because newer oci layers do gzip small layers, so they are skipped because they don't fill the buffer. Commenting out that check means I can load gcr.io/distroless/nodejs20-debian12:latest which I couldn't before.
I hacked around it, pushed my changes here: https://github.com/froody/dive/tree/crane
quite a significant change, basically uses crane as a dest for docker to "push" to, much faster downloads, and now we have the manifest/config ahead of time to decide on the file format
I hacked around it, pushed my changes here: https://github.com/froody/dive/tree/crane
quite a significant change, basically uses crane as a dest for docker to "push" to, much faster downloads, and now we have the manifest/config ahead of time to decide on the file format
Wow, thank you for your work! Can you make a PR?
@reneleonhardt ok I'll try
Thank you, let me know if I can help 🙂
Disabling containerd does it on OSX (Docker Desktop).
(workaround - irrelevant, see next comment)
Disabling containerd does it on OSX (Docker Desktop).
Instead of disabling it, you can use Docker-in-Docker:
docker run -d --name dind --privileged docker
sleep 2
docker exec -it dind \
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
wagoodman/dive [image/command] # or jauderho/dive for ARM64
While not a solution at tool-level, this does provide a workaround without abandoning the privileges of using the containerd store
You can also use deanayalon/dive-dind instead, which is a simple 'docker' docker image with the dive binary installed (Source)
docker run -d --privileged --name dive-dind deanayalon/dive-dind
sleep 2
docker exec -it dive-dind dive [image/command]
The repository also offers a convenient shell script to manage the entire thing, including quick and simple transfer of local images into the dive-dind container
There's also the deanayalon/dive-dind:jauderho tag for their fork
This was created as I could not get froody's binary working
Could not get froody's binary working Issue seems to be resolved with #511 thanks to maddog2050 (source)
🎉