dive: could not find image config
When running Dive on “any” image, I get could not find image config. Same for every image I tried (with or without SHA hashes), e.g
$ dive ubuntu:sha256:ca5534a51dd04bbcebe9b23ba05f389466cf0c190f1f8f182d7eea92a9671d00
Image Source: docker://ubuntu:sha256:ca5534a51dd04bbcebe9b23ba05f389466cf0c190f1f8f182d7eea92a9671d00
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull 'ubuntu:sha256:ca5534a51dd04bbcebe9b23ba05f389466cf0c190f1f8f182d7eea92a9671d00'...
invalid reference format
cannot fetch image
exit status 1
$ dive alpine:latest
Image Source: docker://alpine:latest
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull 'alpine:latest'...
02bb6f428431: Download complete
30e6d35703c5: Download complete
44dd6f223004: Download complete
08409d417260: Download complete
docker.io/library/alpine:latest
cannot fetch image
could not find image config
Docker pull and docker run works on images tried.
$ dive -v
dive 0.10.0
$ docker -v
Docker version 23.0.5, build bc4487a
$ uname -a
Darwin xxx 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 29
- Comments: 34
Disabling
Use containerd for pulling and storing imagesin settings worked for me. (Setting is disabled by default btw)Screenshot
Version 0.12 of this tool:
dive. https://github.com/wagoodman/dive/releases/tag/v0.12.0 That’s the release which included a fix for this issue.👋 Docker engineer here, we are not defaulting to containerd (yet)
In 4.30 we did add a notification to make people aware this is something they can test but that’s about it.
The workaround posted by @Birdie0 won’t work with 25.0+ version (soon to be released).
docker savearchive format is now changed to be OCI compatible (https://github.com/moby/moby/pull/44598) and all blobs are now stored underblobs/sha256directory, so it doesn’t work with the current dive logic which expects layers and config to have a specific extensions: https://github.com/wagoodman/dive/blob/3ef1dd2c74c6952064d866adc2b225048d939f83/dive/image/docker/image_archive.go#L79A simple comparison of the different structure:
v24
v25
As you can see, all image content (OCI index, OCI manifest, image config) are stored without any extension and are named according to their digest.
A complete OCI image layour format is described here: https://github.com/opencontainers/image-spec/blob/main/image-layout.md
Same here
Macbook Pro Apple M1 Maxdive 0.10.0Having same on m2 mac
I can confirm , works on mac m1 with latest 😃 (v0.12.0)
brew upgrade diveInstalling version 0.12.0 works perfectly! Thanks 🙏 . I guess you can close this issue.
For anyone here on a newer version of docker-desktop upgrade to 0.12
I confirm @Birdie0’s fix. Thanks!
Having same on M1
@Birdie0 there are two different issues. There was an issue with Docker that was resolved in dive 0.12.0.
There is a 2nd issue (also https://github.com/wagoodman/dive/issues/507) where the latest version of dive (0.12.0) still doesn’t work when containerd storage is enabled. And Docker Desktop 4.30 made containerd storage the default. This is what @RangerRick was referring to
@RangerRick Make sure you’re running the latest version of dive with
dive -v, especially if you’re usingdocker runalias from readme, it won’t update itself automatically, manually update it withdocker pull wagoodman/diveor add--pull=alwaysto alias if you use it. ex.alias dive="docker run -ti --rm --pull=always -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive"Originally I thought it didn’t work for me too, but turned out I was using older version.dive v0.12.0 didn’t fix it for me but disabling containerd experimental “Features in Development” worked