All Projects β†’ yukinying β†’ Chrome Headless Browser Docker

yukinying / Chrome Headless Browser Docker

Licence: apache-2.0
Continuously building Chrome Docker image for Linux.

Projects that are alternatives of or similar to Chrome Headless Browser Docker

Gowitness
πŸ” gowitness - a golang, web screenshot utility using Chrome Headless
Stars: ✭ 996 (+208.36%)
Mutual labels:  chrome, headless-chrome
Chrome Devtools Protocol
Chrome Devtools Protocol client for PHP
Stars: ✭ 112 (-65.33%)
Mutual labels:  chrome, headless-chrome
Ferrum
Headless Chrome Ruby API
Stars: ✭ 1,009 (+212.38%)
Mutual labels:  chrome, headless-chrome
Minimal Chrome On Heroku
Getting headless chrome running on heroku
Stars: ✭ 12 (-96.28%)
Mutual labels:  chrome, headless-chrome
Api
API that uncovers the technologies used on websites and generates thumbnail from screenshot of website
Stars: ✭ 189 (-41.49%)
Mutual labels:  chrome, headless-chrome
Navalia
A bullet-proof, fast, and reliable headless browser API
Stars: ✭ 950 (+194.12%)
Mutual labels:  chrome, headless-chrome
Mocha Chrome
β˜•οΈ Run Mocha tests using headless Google Chrome
Stars: ✭ 66 (-79.57%)
Mutual labels:  chrome, headless-chrome
Chromy
Chromy is a library for operating headless chrome. 🍺🍺🍺
Stars: ✭ 593 (+83.59%)
Mutual labels:  chrome, headless-chrome
Chroxy
Headless Chrome as a Service
Stars: ✭ 172 (-46.75%)
Mutual labels:  chrome, headless-chrome
Phpchrometopdf
A slim PHP wrapper around google-chrome to convert url to pdf or to take screenshots , easy to use and clean OOP interface
Stars: ✭ 127 (-60.68%)
Mutual labels:  chrome, headless-chrome
Url To Pdf Api
Web page PDF/PNG rendering done right. Self-hosted service for rendering receipts, invoices, or any content.
Stars: ✭ 6,544 (+1926.01%)
Mutual labels:  chrome, headless-chrome
Puppeteer Extra
πŸ’― Teach puppeteer new tricks through plugins.
Stars: ✭ 3,397 (+951.7%)
Mutual labels:  chrome, headless-chrome
Cuprite
Headless Chrome/Chromium driver for Capybara
Stars: ✭ 743 (+130.03%)
Mutual labels:  chrome, headless-chrome
Puppeteer Sharp Extra
Plugin framework for PuppeteerSharp
Stars: ✭ 39 (-87.93%)
Mutual labels:  chrome, headless-chrome
Html Pdf Chrome
HTML to PDF converter via Chrome/Chromium
Stars: ✭ 629 (+94.74%)
Mutual labels:  chrome, headless-chrome
Puppeteer Deep
Puppeteer, Headless ChromeοΌ›ηˆ¬ε–γ€Šes6标准ε…₯门》、θ‡ͺεŠ¨ζŽ¨ζ–‡εˆ°ζŽ˜ι‡‘γ€η«™η‚Ήζ€§θƒ½εˆ†ζžοΌ›ι«˜ηΊ§ηˆ¬θ™«γ€θ‡ͺεŠ¨εŒ–UIζ΅‹θ―•γ€ζ€§θƒ½εˆ†ζžοΌ›
Stars: ✭ 1,033 (+219.81%)
Mutual labels:  chrome, headless-chrome
Headless Chrome Crawler
Distributed crawler powered by Headless Chrome
Stars: ✭ 5,129 (+1487.93%)
Mutual labels:  chrome, headless-chrome
Puppeteer Lambda Starter Kit
Starter Kit for running Headless-Chrome by Puppeteer on AWS Lambda.
Stars: ✭ 563 (+74.3%)
Mutual labels:  chrome, headless-chrome
Squidwarc
Squidwarc is a high fidelity, user scriptable, archival crawler that uses Chrome or Chromium with or without a head
Stars: ✭ 125 (-61.3%)
Mutual labels:  chrome, headless-chrome
Chromeless
πŸ–₯ Chrome automation made simple. Runs locally or headless on AWS Lambda.
Stars: ✭ 13,254 (+4003.41%)
Mutual labels:  chrome, headless-chrome

chrome-headless-browser-docker

Build Status

This repository contains three docker builds.

Chrome Headless Browser

Docker Pulls

This docker image contains the Linux Dev channel Chromium (https://www.chromium.org/getting-involved/dev-channel), with the required dependencies and the command line argument running headless mode provided.

Chrome Headless Browser XL

Docker Pulls

This docker image contains extra fonts thus the image size is much larger.

Chrome Headless Browser with Chrome Driver in Selenium

Docker Pulls

Credits to SeleniumHQ https://github.com/SeleniumHQ/docker-selenium. The Dockerfile and configuration are taken from their repository, with modification to use google-chrome-unstable and removing unnecessary dependencies.


How to run the container:

To run the container with remote-debugging:

docker run --init -it --rm --name chrome --shm-size=1024m -p=127.0.0.1:9222:9222 --cap-add=SYS_ADMIN \
  yukinying/chrome-headless-browser

To run the container with other options, e.g. --dump-dom:

docker run --init -it --rm --name chrome --shm-size=1024m --cap-add=SYS_ADMIN \
  --entrypoint=/usr/bin/google-chrome-unstable \
  yukinying/chrome-headless-browser \
  --headless --disable-gpu --dump-dom https://www.facebook.com

See the following sections for alternate ways to start the container.

Why cap-add=SYS_ADMIN is needed

Currently, there is a user namespace issue in OSX that generates this error:

Failed to move to new namespace: PID namespaces supported, Network namespace supported,
but failed: errno = Operation not permitted

There are two mitigations, but none of them are ideal as it gives the container some special capabilities:

  1. Use a special seccomp profile, as stated in https://twitter.com/jessfraz/status/681934414687801345
docker run --init -it --rm --name chrome --shm-size=1024m -p=127.0.0.1:9222:9222 --security-opt seccomp:/path/to/chrome.json \
  yukinying/chrome-headless-browser
  1. Use CAP_SYS_ADMIN
docker run --init -it --rm --name chrome --shm-size=1024m -p=127.0.0.1:9222:9222 --name chrome --cap-add=SYS_ADMIN \
  yukinying/chrome-headless-browser

Getting More Verbose Output

Try adding the following flag: --enable-logging --v=10000

How to run the container with Selenium:

Standalone mode:

docker run -it --rm --name chrome --shm-size=1024m --cap-add=SYS_ADMIN \
  -p=127.0.0.1:4444:4444 \
  yukinying/chrome-headless-browser-selenium

Node mode:

# First, start your hub.
docker run -it --rm --name hub \
  -p=127.0.0.1:4444:4444 \
  selenium/hub

# Then run your node by registering it to the hub
docker run -it --rm --name node-chrome --link hub:hub --cap-add=SYS_ADMIN \
  yukinying/chrome-headless-browser-selenium \
  -role node -hub http://hub:4444/grid/register \
  -nodeConfig /opt/selenium/config.json

Headless Shell

If you would like to use headless_shell instead of chrome --headless in Docker, please check out https://github.com/yukinying/chrome-headless-travis-build.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].