wagoodman/dive

Unable to `dive` into images build with `buildah`

davidjeddy opened this issue · 3 comments

Dive works great on Docker build images, so much so I want to continue using is as my organization moves away from Docker towards more agnostic tools. Specifically I am trying buildah and podman. So far, everything has gone well with them. Sadly, when I try to dive into an image built with buildah I am responded to with an error.

$ cd project_root
$ buildah images
REPOSITORY                                                                  TAG      IMAGE ID       CREATED             SIZE
433[[REDACTED]]gw                                                           0.0.3    ce0eda2f69e5   23 minutes ago      11.3 MB
433[[REDACTED]]gw                                                           0.0.4    ce0eda2f69e5   23 minutes ago      11.3 MB
localhost/nginx-alpine-boto3                                                0.0.4    ce0eda2f69e5   23 minutes ago      11.3 MB
localhost/nginx-alpine-boto3                                                0.0.2    ce0eda2f69e5   23 minutes ago      11.3 MB
localhost/nginx-alpine-boto3                                                0.0.1    cee5d6a15786   42 minutes ago      11.3 MB
localhost/fedora-httpd                                                      latest   0ae8c1b11fe9   About an hour ago   256 MB
localhost/fedora-httpd                                                      0.0.1    1cf28a879296   About an hour ago   256 MB
docker.io/library/alpine                                                    3.16     bfe296a52501   4 days ago          5.83 MB
registry.fedoraproject.org/fedora                                           latest   885d2b38b819   6 days ago          190 MB
$ rip_docker_long_live_containers$ dive localhost/nginx-alpine-boto3:0.0.4
Image Source: docker://localhost/nginx-alpine-boto3:0.0.4
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull 'localhost/nginx-alpine-boto3:0.0.4'...
Error response from daemon: Get "http://localhost/v2/": dial tcp 127.0.0.1:80: connect: connection refused
cannot fetch image
exit status 1
$ rip_docker_long_live_containers$ dive 433[[REDACTED]]gw:0.0.4
Image Source: docker://433[[REDACTED]]gw:0.0.4
Fetching image... (this can take a while for large images)
Handler not available locally. Trying to pull '433[[REDACTED]]gw:0.0.4'...
Error response from daemon: pull access denied for 433[[REDACTED]]gw, repository does not exist or may require 'docker login': denied: Your authorization token has expired. Reauthenticate and try again.
cannot fetch image
exit status 1
$ rip_docker_long_live_containers$ 

$ dive --version
dive 0.9.2
$ buildah --version
buildah version 1.23.1 (image-spec 1.0.1, runtime-spec 1.0.2-dev)
$ podman --version
podman version 3.4.4

I did indeed double check I have authenticated with the remote repository using docker pull to pull a different image.

Does the road map for Dive include the ability to analyze non-Docker images?

veita commented

Have you tried dive --source podman localhost/nginx-alpine-boto3:0.0.4?

@davidjeddy do you want a --source buildah instead of a --source podman? or is @veita 's solution good enough.

discalimer, I didn't check @veita 's solution at all but it seems like a good jump forward if required

dive --source podman localhost/shared-module-mirroring:1.0.9 does indeed solve the issue. Thank you @veita and @georgettica