forked from marp-team/marp-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (35 loc) · 1.23 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
37
38
39
40
41
FROM node:18.17.0-alpine
LABEL maintainer "Marp team"
RUN apk update && apk upgrade && \
echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories && \
apk add --no-cache \
grep \
chromium@edge \
freetype@edge \
libstdc++@edge \
ttf-liberation@edge \
font-noto-cjk@edge \
font-noto-devanagari@edge \
font-noto-arabic@edge \
font-noto-bengali@edge \
nss@edge \
wayland-dev@edge \
su-exec
RUN addgroup -S marp && adduser -S -g marp marp \
&& mkdir -p /home/marp/app /home/marp/.cli \
&& chown -R marp:marp /home/marp
# Install node dependencies, and create v8 cache by running Marp CLI once
USER marp
ENV CHROME_PATH /usr/bin/chromium-browser
WORKDIR /home/marp/.cli
COPY --chown=marp:marp . .
RUN yarn install --production --frozen-lockfile && yarn cache clean && node marp-cli.js --version
# Setup workspace for user
USER root
ENV MARP_USER marp:marp
ENV PATH $PATH:/home/marp/.cli
WORKDIR /home/marp/app
ENTRYPOINT ["docker-entrypoint"]
CMD ["--help"]