This docker image contains mermaid 7.0.11 and is build on top of the official node 8.8.1 image.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Felix Lohmeier e52d5e41fa
Merge pull request #1 from chadyred/docs/docker-compose
10 months ago
Dockerfile changed fixed versions to mermaid 7.0.0 and phantomjs 2.1.4 because of bug in drawing arrows in mermaid >7.0.0 4 years ago docs(docker): Add docker-compose file in documentation 10 months ago

Docker container for mermaid

mermaid is an open source tool for generating diagram and flowchart from text in a similar manner as markdown. This docker image contains mermaid 7.0.0 and is build on top of the official node 8.8.1 image.

fixed versions


Docker command

docker run --rm -v "$PWD":/data:z -u "$UID:$GID" felixlohmeier/mermaid myflowchart.mdd

Docker compose file

version: '3.7'

    user: "$UID:$GID"
    image: felixlohmeier/mermaid
      - ./:/data:z
    command: ["-s", "-p", "myflowchart.mdd"]

typical workflow

  1. Create your graph in mermaid's live editor
  2. Copy & paste your graph config in a text editor and save it to a local file
  3. Download a stylesheet from (and customize it if you want)
  4. Run a docker container with this Docker image to create png and svg.


  • render both formats (svg + png): -s -p
  • width of the png: 600 pixel: -w 600
  • apply custom stylesheet mermaid.neutral.css from local file -t mermaid.neutral.css
  • name of local file containing graph config: myflowchart.mmd

docker run --rm -v "$PWD":/data:z -u "$UID:$GID" felixlohmeier/mermaid -s -p -w 600 -t mermaid.neutral.css myflowchart.mmd