Skip to content

Instantly share code, notes, and snippets.

@chr0nu5
Created November 8, 2023 18:02
Show Gist options
  • Save chr0nu5/b349b85d3fb87a8a8a04448216d982b3 to your computer and use it in GitHub Desktop.
Save chr0nu5/b349b85d3fb87a8a8a04448216d982b3 to your computer and use it in GitHub Desktop.
Node + Puppeteer
FROM node:slim
# We don't need the standalone Chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
# Install Google Chrome Stable and fonts
# Note: this installs the necessary libs to make the browser work with Puppeteer.
RUN apt-get update && apt-get install gnupg wget -y && \
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/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment