dive

A tool for exploring a Docker image, layer contents, and discovering ways to shrink the size of your Docker/OCI image.

To analyze a Docker image simply run dive with an image tag/id/digest:
dive <your-image-tag>
or you can dive with Docker directly:
alias dive="docker run -ti --rm -v /var/run/docker.sock:/var/run/docker.sock docker.io/wagoodman/dive"
dive <your-image-tag>
# for example
dive nginx:latest
or if you want to build your image then jump straight into analyzing it:
dive build -t <some-tag> .