forked from marp-team/marp-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (31 loc) · 1.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM node:14.15.1-alpine
LABEL maintainer "Marp team"
RUN apk update && apk upgrade && \
echo @edge http://nl.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
echo @edge http://nl.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk add --no-cache \
grep \
chromium@edge \
freetype@edge \
libstdc++@edge \
harfbuzz@edge \
ttf-liberation@edge \
font-noto-cjk@edge \
font-noto-devanagari@edge \
font-noto-arabic@edge \
font-noto-bengali@edge \
nss@edge
RUN addgroup -S marp && adduser -S -g marp marp \
&& mkdir -p /home/marp/app /home/marp/.cli \
&& chown -R marp:marp /home/marp
USER marp
ENV IS_DOCKER true
WORKDIR /home/marp/.cli
COPY --chown=marp:marp . /home/marp/.cli/
RUN yarn add puppeteer-core@chrome-$(chromium-browser --version | sed -r 's/^Chromium ([0-9]+).+$/\1/') || true
RUN yarn install && yarn build && rm -rf ./src ./node_modules && yarn install --production && yarn cache clean \
&& node /home/marp/.cli/marp-cli.js --version
WORKDIR /home/marp/app
ENTRYPOINT ["node", "/home/marp/.cli/marp-cli.js"]
CMD ["--help"]