Skip to content

Run puppeteer inside docker container on most linux servers

License

Notifications You must be signed in to change notification settings

EnssureIT/puppeteer-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Puppeteer Docker

Run puppeteer inside docker container on most linux servers

How to use

For correctly use, you dont need run npm install ou yarn outside docker, because puppeteer install on your platform insteaxd docker container.

Anyelse change on your puppeteer project, need to run first time steps, we recommend to develop in yout platform and run this container only in production

First time runing project:

$ rm -rf node_modules
$ docker-compose up --build

Next times:

$ docker-compose up

NOTE:

  • This node app use app.js as entrypoint, to change it edit Dockerfile CMD ["concurrently","node ./app.js"] with your entrypoint
  • Your puppeteer project need to args provided in app.js:
  const browser = await puppeteer.launch(
    {
      headless: true,
      args: ['--no-sandbox', '--disable-setuid-sandbox']
    }
  );

About

Run puppeteer inside docker container on most linux servers

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published