Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP let puppeteer use chromium from debian repo #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
FROM node:14-slim
FROM node:16-bullseye-slim
lennym marked this conversation as resolved.
Show resolved Hide resolved

RUN apt-get update
# See https://crbug.com/795759
RUN apt-get install -yq libgconf-2-4
RUN apt-get install -yq gnupg
RUN apt-get install -yq libxss1
RUN apt-get install -yq libxtst6
# Install latest chrome dev package, which installs the necessary libs to
# make the bundled version of Chromium that Puppeteer installs work.
RUN apt-get install -y curl --no-install-recommends
RUN curl -k 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
RUN apt-get install -y google-chrome-unstable --no-install-recommends

# chromium is now installable without an external repo since Debian 11 (bullseye)
RUN apt-get install -yq chromium
# puppeteer expects the executable to be named chromium-browser
RUN ln -s /usr/bin/chromium /usr/bin/chromium-browser

RUN addgroup --system app
RUN adduser --system app --uid 999 --home /app/
Expand All @@ -22,6 +15,8 @@ RUN chown -R app:app /app/
USER 999
WORKDIR /app

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true

COPY package.json /app/package.json
COPY package-lock.json /app/package-lock.json
RUN npm ci --production
Expand Down