puppeteer/docker
2024-05-02 10:02:12 +02:00
..
test docs: document dbus in the docker guide (#12378) 2024-05-02 10:02:12 +02:00
Dockerfile fix: don't start dbus service during build in Dockerfile (#12374) 2024-05-02 09:03:07 +02:00
pack.sh refactor: use @puppeteer/browsers for install (#9898) 2023-03-28 09:27:50 +00:00
README.md fix(docker): fix the chrome deb url to https (#11680) 2024-01-15 07:33:52 +01:00

Dockerfile for Puppeteer

This directory contains files needed to containerize Puppeteer. The major problem that this is solving is the problem of providing all dependencies required to run a browser instance.

Building the image

docker build -t puppeteer-chrome-linux . # `puppeteer-chrome-linux` is the name of the image.

Running the image

docker run -i --init --rm --cap-add=SYS_ADMIN --name puppeteer-chrome puppeteer-chrome-linux node -e "`cat test/smoke-test.js`"

--cap-add=SYS_ADMIN capability is needed to enable Chrome sandbox that makes the browser more secure. Alternatively, it should be possible to start the browser binary with the --no-sandbox flag.

GitHub Actions

The image is automatically built, tested, and published by the publish.yml workflow.