Docker Diagrams is a tool that generates diagrams from Docker Compose files.
- supports Docker Compose files compliant with Docker Compose specification
- supports multiple environment variables in Docker Compose files
go install github.com/alex-guoba/docker-diagrams
Make sure you have a Docker Compose file in your current directory.
docker-diagrams
docker-diagrams -i=<path_to_your_docker_compose_file> -e=<environment_file>
Docker-Diagrams will create a folder in the output directory( default to 'go-diagrams') with the graphviz DOT file and any image assets.
Create an ouput image with any graphviz compatible renderer:
dot -Tpng <graphviz_file> <path_to_your_output_image>.png
docker-diagrams -i ./testcase/docker-compose.yml -e testcase/.env.dev
cd go-diagrams
dot -Tpng docker-compose.dot output.png
-e string
path to environment file (default ".env")
-i string
path to docker compose file (default "docker-compose.yml")