Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# A minimal Docker image with Node and Puppeteer
# Initially based upon:
FROM node:16.15.1-buster-slim@sha256:3c8acd4934617f60dad7e4cc941faa064aa5a14da437dc156bdcad9d4a67bc4e as puppeteer
RUN apt-get update \
&& apt-get install -y wget gnupg ca-certificates procps libxss1 git \
&& wget -q -O - | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
# We install Chrome to get all the OS level dependencies, but Chrome itself
# is not actually used as it's packaged in the node puppeteer library.
# Alternatively, we could could include the entire dep list ourselves
# (
# but that seems too easy to get out of date.
&& apt-get install -y google-chrome-stable \
&& rm -rf /var/lib/apt/lists/*
COPY package.json yarn.lock .yarnclean /app/
RUN yarn install --frozen-lockfile --silent --production=false
COPY . /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment