Skip to content

Commit 1805965

Browse files
committed
added arg to install puppeteer deps to base image
1 parent 6243ae3 commit 1805965

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

apps/docker-provider/Containerfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,25 @@
22

33
FROM node:18-slim AS base
44

5+
# ENV DEBIAN_FRONTEND=noninteractive
6+
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
7+
ARG PUPPETEER_DEPS
8+
9+
# Install Google Chrome first to improve build time
10+
RUN if [ "$PUPPETEER" = "true" ]; then \
11+
apt-get update && apt-get install -y wget gnupg \
12+
&& wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg && \
13+
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && \
14+
apt-get update && \
15+
apt-get install google-chrome-stable -y --no-install-recommends && \
16+
rm -rf /var/lib/apt/lists/* \
17+
# elif [ "$PUPPETEER" = "chrome-stable" ]; then \
18+
# apt-get update && apt-get install -y puppeteer; && npx puppeteer browsers install chrome-stable \
19+
else \
20+
echo "Skipping puppeteer install"; \
21+
fi
22+
23+
524
RUN apt-get update \
625
&& apt-get install -y dumb-init
726

0 commit comments

Comments
 (0)