Skip to content

Latest commit

 

History

History
68 lines (50 loc) · 1.24 KB

README.md

File metadata and controls

68 lines (50 loc) · 1.24 KB

DOT

A Docker image for the Graphviz DOT CLI.

https://hub.docker.com/r/nshine/dot

  • Graphviz - Graph Visualization Software
  • DOT - Graph Description Language

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.