-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FYI: Configuration for running mmdc via mermaid-cli docker image #27
Comments
Thank you for sharing! I will add this to the readme. Which docker image do you use? https://hub.docker.com/r/matthewfeickert/mermaid-cli ? |
I've been using the "official" one on the GitHub container registry, |
One catch I've just found is that the "current buffer" command works but the "current file" command doesn't work. I assume because the current file isn't necessarily visible to the docker container. The workaround would be to stick to the "current buffer" command where it writes the input to |
* Adding instructions on using mermaid-cli in docker Thanks to #27 for the tips! * Update README.md
The following configuration will allow rendering mermaid charts without needing to install nodejs+mermaid-cli to the local OS. Instead it will execute mmdc via the mermaid-cli docker image. Figured it'd make sense to note this somewhere in case someone else found it useful:
Some explanation of the
docker run
arguments:-u 1000
ensures that the resulting output png file has a matching UID to the current user, avoiding permissions issues when deleting or overwriting the png. The 1000 is my UID on my machine. There might be a way to figure out the UID directly in emacs.-v /tmp:/tmp
mounts the host/tmp
to/tmp
inside the container. This ensures that mmdc inside the container will be reading/writing to the host/tmp
when rendering.9.1.6
: Latest stable version as of this writing. Can check available tags hereThe text was updated successfully, but these errors were encountered: