dot
dot copied to clipboard
A Docker image for the Graphviz DOT cli
DOT
A Docker image for the Graphviz DOT CLI.
https://hub.docker.com/r/nshine/dot
Usage
Generate a PNG
cat graph.dot | docker run --rm -i nshine/dot > graph.png
Generate Other Outputs
cat graph.dot | docker run --rm -i nshine/dot dot -Tsvg > graph.svg
Use with Terraform Graph
terraform graph | docker run --rm -i nshine/dot > graph.png
Use in GitLab CI
stages:
- terraform
- graph
terraform:
stage: terraform
image: hashicorp/terraform
entrypoint: [""]
script:
- terraform graph > graph.dot
archive:
paths:
- graph.dot
pages:
stage: graph
image: nshine/dot
dependencies:
- terraform
script:
- mkdir -p public
- dot -Tpng graph.dot > public/graph.png
- echo '<html><img src="graph.png" alt="terraform graph"></html>' > public/index.html
archive:
paths:
- public
expire_in: 1h
See the Graphviz Command-line Invocation docs for full documentation on the dot cli.