Skip to content

A Docker cli plugin that implements the tree command for an image

License

Notifications You must be signed in to change notification settings

sergkondr/docker-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-tree

License: MIT GitHub release Go Report Card Go CodeQL

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.

Install

mv ./docker-tree ~/.docker/cli-plugins/docker-tree

Usage

➜ 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/