-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (30 loc) · 778 Bytes
/
Dockerfile
File metadata and controls
41 lines (30 loc) · 778 Bytes
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:16.16 AS builder
WORKDIR /app
# RUN apt-get update
COPY package*.json ./
# Tell Puppeteer to skip installing Chrome
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
RUN npm install --no-audit
COPY . .
#RUN npm run update-models
RUN npm run build
FROM node:16.16-alpine AS release
WORKDIR /app
COPY package*.json ./
COPY . .
# install chromium and dependecies
RUN apk add --no-cache \
chromium \
nss \
freetype \
harfbuzz \
ca-certificates \
ttf-freefont \
nodejs \
yarn
# Tell Puppeteer to skip installing chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
COPY --from=builder /app/dist ./dist
RUN npm install --omit=dev --no-audit
CMD npm run start:server