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

docker-compose-viz

> DevOps
Open source

Docker compose graph visualization

932 stars0 likes3 views
WebsiteGitHub

About

Docker compose graph visualization

docker-compose-viz

How to use

Docker

Considering the current working directory is where your docker-compose.yml file is located:

bash
docker run --rm -it --name dcv -v $(pwd):/input pmsipilot/docker-compose-viz render -m image docker-compose.yml
powershell
# PowerShell
docker run --rm -it --name dcv -v ${pwd}:/input pmsipilot/docker-compose-viz render -m image docker-compose.yml

This will generate the docker-compose.png file in the current working directory.

PHP

Before you start, make sure you have:

  • Composer installed,
  • PHP 7.2 (at least) installed,
  • GraphViz installed (see below for a guide on how to install it)

Self-Compiled

bash
git clone https://github.com/pmsipilot/docker-compose-viz.git

make vendor

Via Composer

bash
composer install --prefer-dist

bin/dcv

Install GraphViz

  • On MacOS:

    bash
    brew install graphviz
  • On Debian:

    bash
    sudo apt-get install graphviz

Usage

…

How to read the graph

Links

Links (from services..links) are displayed as plain arrows pointing to the service that declares the link:

If we look at the link between mysql and ambassador, it reads as follow: "mysql is known as mysql in ambassador." If we look at the link between ambassador and logs, it reads as follow: "ambassador is known as logstash in logs."

External links are displayed using the same shapes but are grayed:

Volumes

Volumes (from services..volumes_from) are displayed as dashed arrows pointing to the service that uses the volumes:

If we look at the link between logs and api, it reads as follow: "api uses volumes from logs."

Volumes (from services..volumes) are displayed as folders with the host directory as label and are linked to the service that uses them dashed arrows.

If we look at the link between ./api and api, it reads as follow: "the host directory ./apiis mounted as a read-write folder on /src in api." Bidirectional arrows mean the directory is writable from the container.

If we look at the link between ./etc/api/php-fpm.d and api, it reads as follow: "the host directory ./etc/api/php-fpm.dis mounted as a read-only folder on /usr/local/etc/php-fpm.d in api." Unidirectional arrows mean the directory is not writable from the container.

Dependencies

Dependencies (from services..depends_on) are displayed as dotted arrows pointing to the service that declares the dependencies:

If we look at the link between mysql and logs, it reads as follow: "mysql depends on logs."

Ports

Ports (from services..ports) are displayed as circle and are linked to containers using plain arrows pointing to the service that declares the ports:

If we look at the link between port 2480 and orientdb, it reads as follow: "traffic coming to host port 2480 will be routed to port 2480 of orientdb." If we look at the link between port 2580 and elk, it reads as follow: "traffix coming to host port 2580 will be routed to port 80 of elk."

Extends

Extended services (from services..extends) are displayed as components (just like normal services). The links between them and the extending services are displayed as inverted arrows:

If we look at the link between mysql and db, it reads as follow: "mysql extends service db".

Networks

Networks (from networks.) are displayed as pentagons. The links between them and services are displayed as plain arrows pointing to the network:

If we look at the link between mysql and the global network, it reads as follow: "mysql is known as mysql, db and reldb in the global network.

The legacy network is an external so it's displayed as a grayed pentagon.

Examples

dot renderer

…

image renderer

display renderer

Troubleshooting

Getting "failed to open stream: Permission denied"?

Make sure the target directory is writeable by the user in the Docker container. Or create a writeable directory first. See workaround #41

License

The MIT License (MIT) Copyright ® 2020 PMSIpilot

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPdockergraphviz

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 服务器与反向代理