A Docker image for the Graphviz DOT CLI.
https://hub.docker.com/r/nshine/dot
cat graph.dot | docker run --rm -i nshine/dot > graph.png
cat graph.dot | docker run --rm -i nshine/dot dot -Tsvg > graph.svg
terraform graph | docker run --rm -i nshine/dot > graph.png
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.