Skip to main contentNedix.io

Diagrams

Mermaid ERD

This Docker image can be used to run the mermerd command-line tool, which can transform database schemas into Mermaid diagrams. The image expects the user to mount their own mermerd configuration file and a file to write the output Mermaid diagram to. When run, the container expects the user to provide a connection string to connect to a database.

Create config and result files

mermerd.yaml
## show debug logs
debug: false
## enclose output with mermaid backticks (needed for e.g. in markdown viewer)
encloseWithMermaidBackticks: true
## omit the attribute keys (PK, FK)
omitAttributeKeys: true
touch result.mmd

Start interactively

docker run --rm -it --net host --name mermerd \
--mount type=bind,source="${PWD}"/mermerd.yaml,target=/root/.mermerd \
--mount type=bind,source="${PWD}"/result.mmd,target=/root/result.mmd \
ghcr.io/nedix/mermerd-docker \
--connectionString "mysql://root:@tcp(host.docker.internal:3306)/mysql"