diff --git a/alpine/Dockerfile b/alpine/Dockerfile index 914906a..566eb65 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -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 diff --git a/alpine/mmdc b/alpine/mmdc new file mode 100755 index 0000000..2b7409a --- /dev/null +++ b/alpine/mmdc @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +/node_modules/.bin/mmdc -p /puppeteer-config.json "$@" \ No newline at end of file diff --git a/alpine/puppeteer-config.json b/alpine/puppeteer-config.json new file mode 100644 index 0000000..7c7312f --- /dev/null +++ b/alpine/puppeteer-config.json @@ -0,0 +1,6 @@ +{ + "executablePath": "/usr/bin/chromium-browser", + "args": [ + "--no-sandbox" + ] +} \ No newline at end of file