-
Notifications
You must be signed in to change notification settings - Fork 33
/
Dockerfile
44 lines (36 loc) · 1 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
42
43
44
FROM node:18-alpine3.17
ARG npm-ci-params
WORKDIR /home/pptruser/app
COPY package*.json ./
RUN npm ci $npm-ci-params
COPY . .
# Puppeteer deps
RUN apk --update add --no-cache \
chromium \
nss \
freetype \
freetype-dev \
harfbuzz \
ca-certificates \
ttf-freefont \
ttf-liberation
# support chinese language
RUN apk add wqy-zenhei \
--update-cache \
--repository http://nl.alpinelinux.org/alpine/edge/testing \
--allow-untrusted
# support emoji
RUN apk add font-noto-emoji \
--update-cache \
--repository http://nl.alpinelinux.org/alpine/edge/community \
--allow-untrusted
COPY local.conf /etc/fonts/local.conf
# Add user so we don't need --no-sandbox.
RUN addgroup -S pptruser && adduser -S -g pptruser pptruser \
&& mkdir -p /home/pptruser/Downloads /app \
&& chown -R pptruser:pptruser /home/pptruser \
&& chown -R pptruser:pptruser /app
# Run everything after as non-privileged user.
USER pptruser
EXPOSE 3000
CMD ["npm", "start"]