Sign inSign up

vastly/puphpeteer

By vastly

•Updated about 7 years ago

Fully functional docker image for puphpeteer.

Image
0

1.7K

vastly/puphpeteer repository overview

⁠Rationale

A docker image for Puphpeteer⁠, PHP port of headless Chrome driver puppeteer⁠.

⁠Usage

⁠Hello World - creates a screenshot of a web-page using Puphpeteer

docker-compose build
docker run --rm --interactive --tty --volume $PWD:/app composer install
docker-compose run helloworld php puphpeteer_hello_world.php

⁠Real Project

  • 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',
			],
	]
);

⁠LICENSE

See LICENSE file.

Tag summary

Content type

Image

Digest

Size

420.8 MB

Last updated

about 7 years ago

docker pull vastly/puphpeteer