This command shows the directory tree of a Docker image, like the 'tree' command. Provide the image name and an optional tag or digest to view the file structure inside the image. You can also specify a directory to see the file tree relative to this directory.
This is not a replacement for the amazing Dive utility, but it works as a Docker plugin, so you might find it simpler and more convenient Think of this app mainly as an attempt to understand how Docker images work and how to create Docker plugins. However, it does work, and I hope you find it useful.
mv ./docker-tree ~/.docker/cli-plugins/docker-tree
➜ docker tree alpine:3.20 /etc/ssl
processing image: alpine:3.20
ssl/
├── cert.pem
├── certs/
│ └── ca-certificates.crt
├── ct_log_list.cnf
├── ct_log_list.cnf.dist
├── openssl.cnf
├── openssl.cnf.dist
└── private/