Skip to content
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

Install mmdc, to allow the rendering of mermaid diagrams #31

Open
wants to merge 1 commit into
base: ng-beta
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,18 @@ RUN gem install pygments.rb
#RUN apk add --no-cache cmark --repository http://nl.alpinelinux.org/alpine/edge/testing && \
# apk add --no-cache --allow-untrusted pandoc --repository https://conoria.gitlab.io/alpine-pandoc/

# Add mermaid
ENV CHROME_BIN="/usr/bin/chromium-browser" \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
RUN apk add --no-cache npm && \
# Dependencies for running puppeteer
apk add --no-cache chromium terminus-font ttf-dejavu ttf-freefont ttf-inconsolata ttf-linux-libertine && \
fc-cache -f && \
npm install @mermaid-js/mermaid-cli
ADD puppeteer-config.json /puppeteer-config.json
ADD mmdc /usr/local/bin/mmdc
RUN chmod +x /usr/local/bin/mmdc

SHELL ["/bin/bash", "-c"]

USER dtcuser
Expand Down
2 changes: 2 additions & 0 deletions alpine/mmdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env bash
/node_modules/.bin/mmdc -p /puppeteer-config.json "$@"
6 changes: 6 additions & 0 deletions alpine/puppeteer-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"executablePath": "/usr/bin/chromium-browser",
"args": [
"--no-sandbox"
]
}