-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (27 loc) · 871 Bytes
/
Dockerfile
File metadata and controls
35 lines (27 loc) · 871 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
FROM node:22.12.0-slim
WORKDIR /app
# Native build deps for node-gyp
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
make \
g++ \
chromium \
ca-certificates \
fonts-liberation \
libnss3 libatk-bridge2.0-0 libx11-xcb1 libxcomposite1 libxdamage1 libxrandr2 \
libgbm1 libasound2 libpangocairo-1.0-0 libpango-1.0-0 libcups2 libdrm2 \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf /usr/bin/python3 /usr/bin/python
# Tell puppeteer NOT to download its own browser
ENV PUPPETEER_SKIP_DOWNLOAD=true
# Where chromium is
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# helps some builds that look for `python` not `python3`
RUN ln -sf /usr/bin/python3 /usr/bin/python
COPY package.json package-lock.json ./
RUN npm ci
COPY tsconfig.json ./
COPY src ./src
COPY schemas ./schemas
RUN npm run build
CMD ["node", "dist/index.js"]