Skip to content
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"
]
}