A docker image for Puphpeteer, PHP port of headless Chrome driver puppeteer.
docker-compose build
docker run --rm --interactive --tty --volume $PWD:/app composer install
docker-compose run helloworld php puphpeteer_hello_world.php
-
create your own
composer.json
, but keep requirements from the original one:php 7.2
"nesk/puphpeteer": "^1.6"
-
use
vastly/puphpeteer
as your base docker image -
Keep in mind mandatory options for puphpeteer's
browser
object in your own scripts:
$browser = $puppeteer->launch(
[
'args' =>
[
// this is required for dockerized puppeteer
'--no-sandbox',
'--disable-setuid-sandbox',
'--disable-dev-shm-usage',
],
]
);
See LICENSE file.