wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
46.32k stars 1.77k forks source link

For a multi-arch image is there a way to specify which architecture to dive? #442

Open chriskinsman opened 1 year ago

chriskinsman commented 1 year ago

Have a multi arch image and trying to debug some image differences per arch. Running dive on amd64 but want to check out an arm64 image filesystem

mkyc commented 3 months ago

I just found workaround for my image I wanted to check.

I cannot dive but actually I cannot also docker pull:

$ dive ghcr.io/mkyc/docker-multitool:v0.0.2-base                       
... boring ...
no matching manifest for linux/arm64/v8 in the manifest list entries
cannot fetch image
exit status 1
$ docker pull ghcr.io/mkyc/docker-multitool:v0.0.2-base
v0.0.2-base: Pulling from mkyc/docker-multitool
... boring ...
no matching manifest for linux/arm64/v8 in the manifest list entries

but if I docker pull with platform I need, then I can dive:

$ docker pull ghcr.io/mkyc/docker-multitool:v0.0.2-base --platform amd64
v0.0.2-base: Pulling from mkyc/docker-multitool
8a49fdb3b6a5: Pull complete 
... boring ...
$ dive ghcr.io/mkyc/docker-multitool:v0.0.2-base                        
Image Source: docker://ghcr.io/mkyc/docker-multitool:v0.0.2-base
Fetching image... (this can take a while for large images)
Analyzing image...
Building cache...