Docker compose graph visualization
docker-compose-vizConsidering the current working directory is where your docker-compose.yml file is located:
docker run --rm -it --name dcv -v $(pwd):/input pmsipilot/docker-compose-viz render -m image docker-compose.yml# PowerShell
docker run --rm -it --name dcv -v ${pwd}:/input pmsipilot/docker-compose-viz render -m image docker-compose.ymlThis will generate the docker-compose.png file in the current working directory.
Before you start, make sure you have:
git clone https://github.com/pmsipilot/docker-compose-viz.git
make vendorcomposer install --prefer-dist
bin/dcvOn MacOS:
brew install graphvizOn Debian:
sudo apt-get install graphviz…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 (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 (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 (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."
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 (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.
dot renderer…image rendererdisplay rendererMake sure the target directory is writeable by the user in the Docker container. Or create a writeable directory first. See workaround #41
The MIT License (MIT) Copyright ® 2020 PMSIpilot
No open issues yet, or sync has not completed.