{"id":13551475,"url":"https://github.com/justone/dockviz","last_synced_at":"2025-05-16T00:05:48.598Z","repository":{"id":16250415,"uuid":"18998308","full_name":"justone/dockviz","owner":"justone","description":"Visualizing Docker data","archived":false,"fork":false,"pushed_at":"2023-07-22T03:52:51.000Z","size":582,"stargazers_count":1216,"open_issues_count":15,"forks_count":107,"subscribers_count":48,"default_branch":"master","last_synced_at":"2025-04-07T23:13:28.326Z","etag":null,"topics":["docker","docker-image","go","graphviz","tree","visualization"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2014-04-21T16:17:32.000Z","updated_at":"2025-03-13T13:14:47.000Z","dependencies_parsed_at":"2022-09-10T15:00:19.173Z","dependency_job_id":null,"html_url":"https://github.com/justone/dockviz","commit_stats":{"total_commits":102,"total_committers":11,"mean_commits":9.272727272727273,"dds":0.3431372549019608,"last_synced_commit":"b87a4d5637bafeadae5e0cae5e0e09269e3f39f3"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justone%2Fdockviz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justone%2Fdockviz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justone%2Fdockviz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justone%2Fdockviz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justone","download_url":"https://codeload.github.com/justone/dockviz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253336892,"owners_count":21892796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-image","go","graphviz","tree","visualization"],"created_at":"2024-08-01T12:01:48.977Z","updated_at":"2025-05-16T00:05:48.295Z","avatar_url":"https://github.com/justone.png","language":"Go","readme":"Follow [@dockviz](https://twitter.com/dockviz) for updates.\n\n# dockviz: Visualizing Docker Data\n\nThis command takes Docker image and container information and presents in\ndifferent ways, to help you understand what's going on inside the system.\n\n# Quick Start\n\n1. Install dockviz.  Either:\n  * Download the [latest release](https://github.com/justone/dockviz/releases).\n  * Set up an alias to run it from the (5.8 MB) docker image:\n\n```\n# if docker client using local unix socket\nalias dockviz=\"docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock nate/dockviz\"\n\n# if docker client using tcp\nalias dockviz=\"docker run -it --rm -e DOCKER_HOST='tcp://127.0.0.1:2375' nate/dockviz\"\n\n```\n\n2. Visualize images by running `dockviz images -t`, which has similar output to `docker images -t`.\n  * Image can be visualized as [Graphviz](http://www.graphviz.org), or as a tree or short summary in the terminal.  Only Graphviz output has been implemented for containers.\n  * If you would like to visualize outside the container you will have to install [Graphviz](http://www.graphviz.org) first.\n\n```\napt-get update \u0026\u0026 apt-get install graphviz\n```\n\nor\n\n```\nbrew update \u0026\u0026 brew install graphviz\n```\n\n# Output Examples\n\n## Containers\n\nCurrently, containers are visualized with labelled lines for links.  Containers that aren't running are greyed out.\n\n```\n# show all containers\n$ dockviz containers -d | dot -Tpng -o containers.png\n\n# only show running containers\n$ dockviz containers -d -r | dot -Tpng -o containers.png\n```\n\n![](sample/containers.png \"Container\")\n\n## Images\n\nImage info is visualized with lines indicating parent images:\n\n```\n$ dockviz images -d | dot -Tpng -o images.png\n```\n\n![](sample/images.png \"Image\")\n\n```\n$ dockviz images -d -l | dot -Tpng -o images.png\nOR\n$ dockviz images --dot --only-labelled | dot -Tpng -o images.png\n```\n\n![](sample/images_only_labelled.png \"Image\")\n\nOr as a treemap:\n\n```\n$ dockviz images -d | patchwork -Tpng -o treemap.png\nOR\n$ dockviz images --dot | patchwork -Tpng -o treemap.png\n```\n\n![](sample/treemap.png \"Image\")\n\nOr in short form:\n\n```\n$ dockviz images -s\nnate/mongodb: latest\nredis: latest\nubuntu: 12.04, precise, 12.10, quantal, 13.04, raring\n```\n\nOr as a tree in the terminal:\n\n```\n$ dockviz images -t\n└─511136ea3c5a Virtual Size: 0.0 B\n  ├─f10ebce2c0e1 Virtual Size: 103.7 MB\n  │ └─82cdea7ab5b5 Virtual Size: 103.9 MB\n  │   └─5dbd9cb5a02f Virtual Size: 103.9 MB\n  │     └─74fe38d11401 Virtual Size: 209.6 MB Tags: ubuntu:12.04, ubuntu:precise\n  ├─ef519c9ee91a Virtual Size: 100.9 MB\n  │ └─07302703becc Virtual Size: 101.2 MB\n  │   └─cf8dc907452c Virtual Size: 101.2 MB\n  │     └─a7cf8ae4e998 Virtual Size: 171.3 MB Tags: ubuntu:12.10, ubuntu:quantal\n  │       │─e18d8001204e Virtual Size: 171.3 MB\n  │       │ └─d0525208a46c Virtual Size: 171.3 MB\n  │       │   └─59dac4bae93b Virtual Size: 242.5 MB\n  │       │     └─89541b3b35f2 Virtual Size: 511.8 MB\n  │       │       └─7dac4e98548e Virtual Size: 511.8 MB\n  │       │         └─341d0cc3fac8 Virtual Size: 511.8 MB\n  │       │           └─2f96171d2098 Virtual Size: 511.8 MB\n  │       │             └─67b8b7262a67 Virtual Size: 513.7 MB\n  │       │               └─0fe9a2bc50fe Virtual Size: 513.7 MB\n  │       │                 └─8c32832f07ba Virtual Size: 513.7 MB\n  │       │                   └─cc4e1358bc80 Virtual Size: 513.7 MB\n  │       │                     └─5c0d04fba9df Virtual Size: 513.7 MB Tags: nate/mongodb:latest\n  │       └─398d592f2009 Virtual Size: 242.2 MB\n  │         └─0cd8e7f50270 Virtual Size: 243.6 MB\n  │           └─594b6f8e6f92 Virtual Size: 243.6 MB\n  │             └─f832a63e87a4 Virtual Size: 243.6 MB Tags: redis:latest\n  └─02dae1c13f51 Virtual Size: 98.3 MB\n    └─e7206bfc66aa Virtual Size: 98.5 MB\n      └─cb12405ee8fa Virtual Size: 98.5 MB\n        └─316b678ddf48 Virtual Size: 169.4 MB Tags: ubuntu:13.04, ubuntu:raring\n```\n\nOnly showing labelled images:\n\n```\n$ dockviz images -t -l\n└─511136ea3c5a Virtual Size: 0.0 B\n  ├─f10ebce2c0e1 Virtual Size: 103.7 MB\n  │ └─74fe38d11401 Virtual Size: 209.6 MB Tags: ubuntu:12.04, ubuntu:precise\n  ├─ef519c9ee91a Virtual Size: 100.9 MB\n  │ └─a7cf8ae4e998 Virtual Size: 171.3 MB Tags: ubuntu:12.10, ubuntu:quantal\n  │   ├─5c0d04fba9df Virtual Size: 513.7 MB Tags: nate/mongodb:latest\n  │   └─f832a63e87a4 Virtual Size: 243.6 MB Tags: redis:latest\n  └─02dae1c13f51 Virtual Size: 98.3 MB\n    └─316b678ddf48 Virtual Size: 169.4 MB Tags: ubuntu:13.04, ubuntu:raring\n```\n\nShowing incremental size rather than cumulative:\n\n```\n$ dockviz images -t -i\n└─511136ea3c5a Virtual Size: 0.0 B\n  ├─f10ebce2c0e1 Virtual Size: 103.7 MB\n  │ └─82cdea7ab5b5 Virtual Size: 255.5 KB\n  │   └─5dbd9cb5a02f Virtual Size: 1.9 KB\n  │     └─74fe38d11401 Virtual Size: 105.7 MB Tags: ubuntu:12.04, ubuntu:precise\n  ├─ef519c9ee91a Virtual Size: 100.9 MB\n  │ └─07302703becc Virtual Size: 251.0 KB\n  │   └─cf8dc907452c Virtual Size: 1.9 KB\n  │     └─a7cf8ae4e998 Virtual Size: 70.1 MB Tags: ubuntu:12.10, ubuntu:quantal\n  │       ├─e18d8001204e Virtual Size: 29.4 KB\n  │       │ └─d0525208a46c Virtual Size: 71.0 B\n  │       │   └─59dac4bae93b Virtual Size: 71.2 MB\n  │       │     └─89541b3b35f2 Virtual Size: 269.3 MB\n  │       │       └─7dac4e98548e Virtual Size: 0.0 B\n  │       │         └─341d0cc3fac8 Virtual Size: 0.0 B\n  │       │           └─2f96171d2098 Virtual Size: 0.0 B\n  │       │             └─67b8b7262a67 Virtual Size: 1.9 MB\n  │       │               └─0fe9a2bc50fe Virtual Size: 656.0 B\n  │       │                 └─8c32832f07ba Virtual Size: 383.0 B\n  │       │                   └─cc4e1358bc80 Virtual Size: 0.0 B\n  │       │                     └─5c0d04fba9df Virtual Size: 0.0 B Tags: nate/mongodb:latest\n  │       └─398d592f2009 Virtual Size: 70.9 MB\n  │         └─0cd8e7f50270 Virtual Size: 1.4 MB\n  │           └─594b6f8e6f92 Virtual Size: 0.0 B\n  │             └─f832a63e87a4 Virtual Size: 0.0 B Tags: redis:latest\n  └─02dae1c13f51 Virtual Size: 98.3 MB\n    └─e7206bfc66aa Virtual Size: 190.0 KB\n      └─cb12405ee8fa Virtual Size: 1.9 KB\n        └─316b678ddf48 Virtual Size: 70.8 MB Tags: ubuntu:13.04, ubuntu:raring\n```\n\nShowing non-human numbers, for precision:\n\n```\n$ dockviz images -t -i -c\n└─511136ea3c5a Size: 0\n  ├─f10ebce2c0e1 Size: 103675325\n  │ └─82cdea7ab5b5 Size: 255455\n  │   └─5dbd9cb5a02f Size: 1919\n  │     └─74fe38d11401 Size: 105667193 Tags: ubuntu:12.04, ubuntu:precise\n  ├─ef519c9ee91a Size: 100930679\n  │ └─07302703becc Size: 250998\n  │   └─cf8dc907452c Size: 1919\n  │     └─a7cf8ae4e998 Size: 70094270 Tags: ubuntu:12.10, ubuntu:quantal\n  │       ├─e18d8001204e Size: 29352\n  │       │ └─d0525208a46c Size: 71\n  │       │   └─59dac4bae93b Size: 71150930\n  │       │     └─89541b3b35f2 Size: 269335966\n  │       │       └─7dac4e98548e Size: 0\n  │       │         └─341d0cc3fac8 Size: 0\n  │       │           └─2f96171d2098 Size: 0\n  │       │             └─67b8b7262a67 Size: 1866379\n  │       │               └─0fe9a2bc50fe Size: 656\n  │       │                 └─8c32832f07ba Size: 383\n  │       │                   └─cc4e1358bc80 Size: 0\n  │       │                     └─5c0d04fba9df Size: 0 Tags: nate/mongodb:latest\n  │       └─398d592f2009 Size: 70917743\n  │         └─0cd8e7f50270 Size: 1418392\n  │           └─594b6f8e6f92 Size: 0\n  │             └─f832a63e87a4 Size: 0 Tags: redis:latest\n  └─02dae1c13f51 Size: 98348330\n    └─e7206bfc66aa Size: 190007\n      └─cb12405ee8fa Size: 1903\n        └─316b678ddf48 Size: 70822908 Tags: ubuntu:13.04, ubuntu:raring\n```\n\nIt is also possible to show the image's CreatedBy field, for help identifying\nimage layers when they show up with \"\u003cmissing\u003e\" image Ids.\n\n# Running\n\nDockviz supports connecting to the Docker daemon directly.  It defaults to `unix:///var/run/docker.sock`, but respects the following as well:\n\n* The `DOCKER_HOST`, `DOCKER_CERT_PATH`, and `DOCKER_TLS_VERIFY` environment variables, as set up by [boot2docker](http://boot2docker.io/) or [docker-machine](https://docs.docker.com/machine/).\n\n* Command line arguments (e.g. `--tlscacert`), like those that Docker itself supports.\n\nDockviz also supports receiving Docker image or container json data on standard input.\n\n```\n$ curl -s http://localhost:4243/images/json?all=1 | dockviz --stdin images --tree\n$ curl -s http://localhost:4243/containers/json?all=1 | dockviz --stdin containers --dot | dot -Tpng -o containers.png\n$ echo -e \"GET /images/json?all=1 HTTP/1.0\\r\\n\" | nc -U /var/run/docker.sock | sed '1,/^[[:space:]]*$/d' | dockviz --stdin images --tree\n$ echo -e \"GET /containers/json?all=1 HTTP/1.0\\r\\n\" | nc -U /var/run/docker.sock | sed '1,/^[[:space:]]*$/d' | dockviz --stdin containers --dot | dot -Tpng -o containers.png\n$ echo -e \"GET /images/json?all=1 HTTP/1.0\\r\\n\" | nc -U /var/run/docker.sock | sed '1,/^[[:space:]]*$/d' | docker run -i nate/dockviz --stdin images --tree\n$ echo -e \"GET /containers/json?all=1 HTTP/1.0\\r\\n\" | nc -U /var/run/docker.sock | sed '1,/^[[:space:]]*$/d' | docker run -i nate/dockviz --stdin containers --dot | dot -Tpng -o containers.png\n```\n\nNote: GNU netcat doesn't support `-U` (UNIX socket) flag, so OpenBSD variant can be used.\n\n# Binaries\n\nSee the [releases](https://github.com/justone/dockviz/releases) area for binaries.\n\n# Build\n\n```bash\n# install graphviz in host environment for rendering (Debian example)\nsudo apt-get install git graphviz -y\n\n# pull latest code\nmkdir -p $GOPATH/src/github.com/nate/ \u0026\u0026 cd $GOPATH/src/github.com/nate/\ngit clone https://github.com/nate/dockviz.git \u0026\u0026 cd dockviz\n\n# force static compilation for go language\nexport CGO_ENABLED=0\n\n# fetch vendored dependencies\ngovendor sync\n\n# build\ngo build\n\n# build docker image\ndocker build --no-cache=true -t \"nate/dockviz:1.0\" -t \"nate/dockviz:latest\" .\n\n# push to docker hub\ndocker login --username=mygituser --password=xxxxxxx\ndocker push nate/dockviz\n\n```\n","funding_links":[],"categories":["Go","visualization","go","Repositories"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustone%2Fdockviz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustone%2Fdockviz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustone%2Fdockviz/lists"}