wagoodman / dive

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

If we have a Containerfile instead of a Dockerfile, dive is not working #536

Open scraly opened 1 week ago

scraly commented 1 week ago

What happened:

$ dive build my-folder -t my-img:v0.1
Building image...
[+] Building 0.1s (1/1) FINISHED                                                                                                                             docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                         0.0s
 => => transferring dockerfile: 2B                                                                                                                                           0.0s
ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/uqu79lpwm9igb05ztacitkdga
cannot build image
exit status 1

What you expected to happen:

$ dive build my-folder -t my-img:v0.1
Building image...
[+] Building 0.6s (8/8) FINISHED                                                                                                                             docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                         0.0s
 => => transferring dockerfile: 134B                                                                                                                                         0.0s
 => [internal] load metadata for registry.access.redhat.com/ubi9/ubi-micro:latest                                                                                            0.5s
 => [internal] load .dockerignore                                                                                                                                            0.0s
 => => transferring context: 2B                                                                                                                                              0.0s
 => [internal] load build context                                                                                                                                            0.0s
 => => transferring context: 7.67kB                                                                                                                                          0.0s
 => [1/4] FROM ...............................                                                                                                                                    0.0s
 => exporting to image                                                                                                                                                       0.0s
 => => exporting layers                                                                                                                                                      0.0s
 => => writing image sha256:34126ca8646db858da1aa321533b736829fec5bd7a763b4aefeb78d137afceff                                                                                 0.0s
 => => naming to .........                                                                                                                            0.0s

View build details: docker-desktop://dashboard/build/desktop-linux/desktop-linux/721o2x2iq0eyjcpaxb2q83uv4

What's Next?
  View a summary of image vulnerabilities and recommendations → docker scout quickview
Analyzing image...
Building cache...

and displaying dive

How to reproduce it (as minimally and precisely as possible):

Having a Containerfile instead of a Dockerfile

Thanks to that Dive will be compliant with Containerfile instead (podman, buildah)