iTranslated by AI
The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🐙
Visualizing Docker Compose dependencies as a graph
Running docker compose alpha viz reads the depends_on settings in compose.yaml and allows you to visualize them as a graph.
$ docker compose alpha viz
viz command is EXPERIMENTAL
digraph "tmp" {
layout=dot;
"db" [style="filled" label=<<font point-size="15">db</font>>];
"proxy" [style="filled" label=<<font point-size="15">proxy</font>>];
"backend" [style="filled" label=<<font point-size="15">backend</font>>];
"proxy" -> "backend";
"backend" -> "db";
}
https://docs.docker.com/reference/cli/docker/compose/alpha/viz/
On Sixel-compatible terminals, you can output an image by piping the output as Compose → Graphviz → PNG -> Sixel.
docker compose alpha viz | dot -Tpng | img2sixel

Discussion