TIL :: Graphviz ๐Ÿ‘‰ PNG with docker

A simple Graphviz dot file. You could try generating brew dependencies graph

Create a Docker image

FROM alpine:3.5

RUN mkdir /graphviz && \
  apk add --update graphviz ttf-dejavu && \
  rm -rf /var/cache/apk/*

WORKDIR /graphviz

CMD dot -Tpng

Build Docker image from this file

docker build -f Dockerfile -t namuan/dot2png .

And then run it with the dot file

cat dependencies.dot | docker run --rm -i namuan/dot2png > dependencies.png