Skip to content

lecaoquochung/docker-puppeteer

Repository files navigation

Docker-Puppeteer

Docker image for puppeteer.

CircleCI Build Status Automated Build Windows Build Status Build Status

Welcome to Docker-Puppeteer, your go-to Docker image for using Puppeteer. Puppeteer is a Node.js library that provides a convenient high-level API for controlling Chrome or Chromium through the DevTools Protocol. Whether you want to run Chrome in headless mode or need the full Chrome experience, Puppeteer has you covered.

Supported Branches

We offer the following Docker image branches for your convenience:

  • nodejs:latest (Docker image: lecaoquochung/puppeteer:latest) Dockerfile

  • nodejs:18.17.0 (Docker image: lecaoquochung/puppeteer:node-18.17.0) Dockerfile

What is Puppeteer?

Puppeteer simplifies browser automation tasks by providing a user-friendly way to interact with Chrome or Chromium. Whether you're scraping web data, generating PDFs, or running end-to-end tests, Puppeteer's got you covered with its easy-to-use API.

Getting image

sudo docker pull lecaoquochung/docker-puppeteer

Basic usage

Docker

# TODO run direct script with docker
# sudo docker run -v /path/to/your/app:/code -d lecaoquochung/docker-puppeteer

docker-compose

  • docker-compose.yml
version: '3.7'

services:
  puppeteer:
    container_name: 
    image: lecaoquochung/puppeteer:latest
    init: true
    tty: true
    stdin_open: true
    volumes:
      - ./:/code
    working_dir: /code
    env_file:
      - .env
    dns: 8.8.8.8
    entrypoint: ["sh", "-c", "sleep infinity"]

Reference