wagoodman/dive

is it possible to use dive with podman on a M1 mac?

HCharlie opened this issue · 7 comments

I am using M1 mac, when I run dive with images from podman, I see below error message

➜  ~ dive docker.io/library/ubuntu --source podman
Image Source: podman://docker.io/library/ubuntu
Fetching image... (this can take a while for large images)
cannot fetch image
unsupported platform

I am not sure if I did something wrong or it's just not supported.

I know that you have to make sure there is an ARM build in the image manifest. The unsupported platform kind of suggests an issue with the image arch (x64 is available but not ARM64). I can test this on my m1 @HCharlie.... You're using podman instead of docker..... are there any other mods?

@HCharlie the project appears to only be compiled in AMD64 (x64). What this means is that dive can run on an ARM machine with x64 emulation (Apple's Rosetta), but that doesn't mean it's compatible with ARM based Docker. I suspect this project could be compiled for ARM and it would automatically support ARM supported Docker images, but that will need to be tested. I'll poke at it over the weekend :)

I know that you have to make sure there is an ARM build in the image manifest. The unsupported platform kind of suggests an issue with the image arch (x64 is available but not ARM64). I can test this on my m1 @HCharlie.... You're using podman instead of docker..... are there any other mods?

Actually, I haven't tested with Docker on M1 chip, I was just a bit curious about it with podman.

only be compiled in AMD64 (x64). What this means is that dive can run on an ARM machine with x64 emulation (Apple's Rosetta), but that doesn't mean it's compatible with ARM based Docker. I suspect this project could be compiled for ARM and it wo

thanks for the effort. 👍

yes you can!
I did the following:

podman machine start
export DOCKER_HOST='unix:...podman.sock # should be in your podman machine start command
dive <image>

let me know if this helped you too and I will create a PR to add it to the docs ( and maybe into the podman error messages)

@HCharlie @shoesCodeFor

Thanks for your reply @georgettica , the error is still there.

➜  ~ export DOCKER_HOST='unix:///Users/chhan/.local/share/containers/podman/machine/podman-machine-default/podman.sock'
➜  ~ podman images
REPOSITORY                                           TAG         IMAGE ID      CREATED      SIZE
docker.io/library/postgres                           14          8b00aa4789b5  13 days ago  365 MB
docker.io/library/httpd                              latest      9b033834913c  2 weeks ago  143 MB
docker.io/library/ubuntu                             22.04       a6be1f66f70f  4 weeks ago  71.8 MB
<none>                                               <none>      042a816809aa  6 weeks ago  7.34 MB
docker.io/library/alpine                             latest      04eeaa5f8c35  6 weeks ago  7.75 MB
➜  ~ dive docker.io/library/ubuntu --source podman
Image Source: podman://docker.io/library/ubuntu
Fetching image... (this can take a while for large images)
cannot fetch image
unsupported platform

What I did was podman pull the image and then run it