Skip to content

ivastly/docker-puphpeteer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

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.

About

Fully functional docker image for puphpeteer.

Resources

License

Stars

Watchers

Forks

Packages

No packages published