-
Notifications
You must be signed in to change notification settings - Fork 4
/
Containerfile
24 lines (18 loc) · 965 Bytes
/
Containerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM node:21.1.0-bookworm-slim
# We don't need the standalone Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV DEBIAN_FRONTEND=noninteractive
# Install Google Chrome Stable and fonts
# Note: this installs the necessary libs to make the browser work with Puppeteer.
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked apt-get update \
&& apt-get install -y gnupg wget awscli curl \
&& wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update && apt-get install google-chrome-stable -y --no-install-recommends \
&& rm -rf /var/lib/apt/lists/*
USER node
WORKDIR /app
RUN npm install puppeteer
COPY --chown=node:node . .
# just run the container doing nothing
ENTRYPOINT ["sh", "-c", "sleep infinity"]