Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

dockviz

> DevOps
Open source

Visualizing Docker data

1.2K stars0 likes2 views
WebsiteGitHub

About

Visualizing Docker data

Follow @dockviz for updates.

dockviz: Visualizing Docker Data

This command takes Docker image and container information and presents in different ways, to help you understand what's going on inside the system.

Quick Start

  1. Install dockviz. Either:
  • Download the latest release.
  • Set up an alias to run it from the (5.8 MB) docker image:
# if docker client using local unix socket
alias dockviz="docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz"

# if docker client using tcp
alias dockviz="docker run -it --rm -e DOCKER_HOST='tcp://127.0.0.1:2375' nate/dockviz"
  1. Visualize images by running dockviz images -t, which has similar output to docker images -t.
  • Image can be visualized as Graphviz, or as a tree or short summary in the terminal. Only Graphviz output has been implemented for containers.
  • If you would like to visualize outside the container you will have to install Graphviz first.
apt-get update && apt-get install graphviz

or

bash
brew update && brew install graphviz

Output Examples

Containers

Currently, containers are visualized with labelled lines for links. Containers that aren't running are greyed out.

# show all containers
$ dockviz containers -d | dot -Tpng -o containers.png

# only show running containers
$ dockviz containers -d -r | dot -Tpng -o containers.png

Images

Image info is visualized with lines indicating parent images:

$ dockviz images -d | dot -Tpng -o images.png
$ dockviz images -d -l | dot -Tpng -o images.png
OR
$ dockviz images --dot --only-labelled | dot -Tpng -o images.png

Or as a treemap:

$ dockviz images -d | patchwork -Tpng -o treemap.png
OR
$ dockviz images --dot | patchwork -Tpng -o treemap.png

Or in short form:

$ dockviz images -s
nate/mongodb: latest
redis: latest
ubuntu: 12.04, precise, 12.10, quantal, 13.04, raring

Or as a tree in the terminal:

…

Only showing labelled images:

$ dockviz images -t -l
└─511136ea3c5a Virtual Size: 0.0 B
  ├─f10ebce2c0e1 Virtual Size: 103.7 MB
  │ └─74fe38d11401 Virtual Size: 209.6 MB Tags: ubuntu:12.04, ubuntu:precise
  ├─ef519c9ee91a Virtual Size: 100.9 MB
  │ └─a7cf8ae4e998 Virtual Size: 171.3 MB Tags: ubuntu:12.10, ubuntu:quantal
  │   ├─5c0d04fba9df Virtual Size: 513.7 MB Tags: nate/mongodb:latest
  │   └─f832a63e87a4 Virtual Size: 243.6 MB Tags: redis:latest
  └─02dae1c13f51 Virtual Size: 98.3 MB
    └─316b678ddf48 Virtual Size: 169.4 MB Tags: ubuntu:13.04, ubuntu:raring

Showing incremental size rather than cumulative:

…

Showing non-human numbers, for precision:

…

It is also possible to show the image's CreatedBy field, for help identifying image layers when they show up with "" image Ids.

Running

Dockviz supports connecting to the Docker daemon directly. It defaults to unix:///var/run/docker.sock, but respects the following as well:

  • The DOCKER_HOST, DOCKER_CERT_PATH, and DOCKER_TLS_VERIFY environment variables, as set up by boot2docker or docker-machine.

  • Command line arguments (e.g. --tlscacert), like those that Docker itself supports.

Dockviz also supports receiving Docker image or container json data on standard input.

…

Note: GNU netcat doesn't support -U (UNIX socket) flag, so OpenBSD variant can be used.

Binaries

See the releases area for binaries.

Build

bash
# install graphviz in host environment for rendering (Debian example)
sudo apt-get install git graphviz -y

# pull latest code
mkdir -p $GOPATH/src/github.com/nate/ && cd $GOPATH/src/github.com/nate/
git clone https://github.com/nate/dockviz.git && cd dockviz

# force static compilation for go language
export CGO_ENABLED=0

# fetch vendored dependencies
govendor sync

# build
go build

# build docker image
docker build --no-cache=true -t "nate/dockviz:1.0" -t "nate/dockviz:latest" .

# push to docker hub
docker login --username=mygituser --password=xxxxxxx
docker push nate/dockviz

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Godockerdocker-imagegographviz

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理