Skip to content

Instantly share code, notes, and snippets.

@Munawwar
Created June 22, 2021 15:31
Show Gist options
  • Save Munawwar/1ef8de8e6c1625d6f8038c8b14db96c9 to your computer and use it in GitHub Desktop.
Save Munawwar/1ef8de8e6c1625d6f8038c8b14db96c9 to your computer and use it in GitHub Desktop.
node.js + puppeteer minimal docker file
# A minimal Docker file for node.js and Puppeteer
# debian 10 (buster slim) amd64 + node v14
# https://hub.docker.com/layers/node/library/node/14.17.1-buster-slim/images/sha256-10c6bf7204614c18b0734a218f576082ea2d15e9af7b7817a07eddcd7d05a255?context=explore
FROM node:14.17.1-buster-slim@sha256:10c6bf7204614c18b0734a218f576082ea2d15e9af7b7817a07eddcd7d05a255
RUN apt-get update \
# Install dependencies of Chromium that Puppeteer installs
# Dependency list for puppeteer v10.0.0 taken from https://github.com/puppeteer/puppeteer/blob/v10.0.0/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-unix
# Puppeteer v10.0.0 installs Chromium 92.0.4512.0 / r884014
# Also install some fonts for puppeteer
&& apt-get install -y --no-install-recommends \
ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libc6 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgbm1 \
libgcc1 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libstdc++6 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
libxss1 \
libxtst6 \
lsb-release \
wget \
xdg-utils \
# Fonts
fonts-ipafont-gothic=00303-16 \
fonts-wqy-zenhei=0.9.45-6 \
fonts-thai-tlwg=1:0.6.3-1 \
fonts-kacst=2.01+mry-12 \
ttf-freefont=20120503-6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment