dive icon indicating copy to clipboard operation
dive copied to clipboard

Broken since docker 26

Open sbp-bvanb opened this issue 1 year ago • 13 comments

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)

sbp-bvanb avatar Jun 13 '24 08:06 sbp-bvanb

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.

black-snow avatar Jun 18 '24 14:06 black-snow

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.

alastair87 avatar Jun 22 '24 18:06 alastair87

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.

calebAtIspot avatar Jul 08 '24 19:07 calebAtIspot

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

calebAtIspot avatar Jul 08 '24 21:07 calebAtIspot

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.

max-allan avatar Jul 17 '24 09:07 max-allan

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.

froody avatar Aug 12 '24 03:08 froody

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

froody avatar Aug 20 '24 08:08 froody

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 avatar Aug 20 '24 11:08 reneleonhardt

@reneleonhardt ok I'll try

froody avatar Aug 23 '24 03:08 froody

Thank you, let me know if I can help 🙂

reneleonhardt avatar Aug 24 '24 13:08 reneleonhardt

Disabling containerd does it on OSX (Docker Desktop).

bredamatt avatar Sep 25 '24 09:09 bredamatt

(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

DeanAyalon avatar Oct 10 '24 23:10 DeanAyalon

Could not get froody's binary working Issue seems to be resolved with #511 thanks to maddog2050 (source)

DeanAyalon avatar Nov 02 '24 14:11 DeanAyalon

🎉

willcl-ark avatar Mar 18 '25 07:03 willcl-ark