GithubHelp home page GithubHelp logo

caperneoignis / chrome-headless-browser-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yukinying/chrome-headless-browser-docker

0.0 2.0 0.0 84 KB

Continuously building Chrome Docker image for Linux.

Home Page: https://store.docker.com/community/images/caperneoignis/chrome-headless-browser/tags

License: Apache License 2.0

chrome-headless-browser-docker's Introduction

special thanks to

justinribeiro I used his MakeFile with the test script I had acquired from the forked repo that post the version informaiton.

chrome-headless-browser-docker

This repository contains one docker builds.

Build Status

Chrome Headless Browser

This docker image contain 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.


Variables that can be set at run time

Variable Default
RMT_DBG_ADDR 0.0.0.0
RMT_DBG_PORT 9222
RMT_DBG_WIN_SIZE "1920,1080"

These variables can be set with the -e switch at run time, so you can get different settings for the chrome browser at run time.

How to run the container:

To run the container with remote-debugging:

docker run -d -p 9222:9222 --cap-add=SYS_ADMIN caperneoignis/chrome-headless-browser

To run the container with remote-debugging and different setting when using with latest vs latest_apache tag:

docker run -d -p 9222:9222 --cap-add=SYS_ADMIN caperneoignis/chrome-headless-browser:latest --no-sandbox --disable-gpu --dump-dom https://google.com

docker run -d -p 9223:9223 -e RMT_DBG_PORT=9223 --cap-add=SYS_ADMIN caperneoignis/chrome-headless-browser:latest_apache

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 -d --name chrome -p 9222:9222 --security-opt seccomp:/path/to/chrome.json caperneoignis/chrome-headless-browser
  1. Use CAP_SYS_ADMIN
docker run -d --name chrome -p 9222:9222 --cap-add=SYS_ADMIN caperneoignis/chrome-headless-browser

chrome-headless-browser-docker's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.