-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (21 loc) · 839 Bytes
/
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
ARG NODE_VERSION=21.7.1
FROM node:${NODE_VERSION}
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
WORKDIR /usr/src/app
# Install git otherwise everything fails idk why
RUN apt-get install -y git
# Install dependencies
RUN apt-get update && apt-get install -y wget gnupg
# Install Chrome
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
RUN apt-get update && apt-get install -y google-chrome-stable --no-install-recommends
ENV CHROME_BIN=google-chrome-stable
COPY package.json yarn.lock ./
RUN yarn install --no-lockfile
# Run the application as a non-root user.
USER root
# Copy the rest of the source files into the image.
COPY . .
# Run the application.
CMD npm start