puppeteer/docker
jrandolf f42336cf83
feat: separate puppeteer and puppeteer-core (#9023)
This PR moves the puppeteer source code into separate mono-repo packages:

- `puppeteer` and `puppeteer-core` are now separated into their own
packages.
- `puppeteer-core` has a new exports called `puppeteer-core/internal`
for internal usage.

Tests and various tools have been updated to accommodate the migration.
2022-10-05 14:17:03 +02:00
..
test feat: add Dockerfile (#8315) 2022-08-02 13:18:47 +00:00
Dockerfile feat: separate puppeteer and puppeteer-core (#9023) 2022-10-05 14:17:03 +02:00
pack.sh feat: separate puppeteer and puppeteer-core (#9023) 2022-10-05 14:17:03 +02:00
README.md docs: add documentation about Docker (#8741) 2022-08-05 11:00:09 +02: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.js`"

--cap-add=SYS_ADMIN capability is needed to enable Chromium 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-docker.yml workflow.