Giter Club home page Giter Club logo

chrome-headless's Introduction

Chrome Headless

To run (without seccomp):

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

To run a better way (with seccomp):

docker run -d -p 9222:9222 --security-opt seccomp=$HOME/chrome.json isholgueras/chrome-headless

Using In DevTools

Open Chrome and browse to http://localhost:9222/.

Information on Chrome headless

General Use

docker run -d -p 9222:9222 isholgueras/chrome-headless

Using In DevTools

Open Chrome and browse to http://localhost:9222/.

Known issues

Unsafe Scripts

You may have to Load unsafe scripts from the omnibox shield icon to allow connecting to the insecure websocket endpoint ws://localhost:9222:

image

Red herrings

Depending on the current build, if you run the container interactively you may see things like this on the console:

[0501/162901.033074:WARNING:audio_manager.cc(295)] Multiple instances of AudioManager detected
[0501/162901.033169:WARNING:audio_manager.cc(254)] Multiple instances of AudioManager detected

In most cases, these messages can be safely ignored. They will sometimes change and eventually as things are updated in the source tree, resolved.

Building and Pushing

To build, ./build.sh <tag>, for example ./build.sh isholgueras/chrome-headless:20211007-chromium

To push, ./build.sh <tag>, for example ./push.sh isholgueras/chrome-headless:20211007-chromium. This will push both amd64 and arm64 images.

Compatibility

This image was updated to chromium to support the new M1 processors. If you prefer keep using the previous chrome version, feel free to use the :chrome tag

chrome-headless's People

Contributors

isholgueras avatar rfay avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chrome-headless's Issues

Image does not work on M1 MacBook's(arm64)

qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
[0709/091839.560661:ERROR:file_path_watcher_linux.cc(318)] inotify_init() failed: Function not implemented (38)
Fontconfig warning: "/etc/fonts/fonts.conf", line 100: unknown element "blank"
DevTools listening on ws://0.0.0.0:9222/devtools/browser/2e133d2e-a0e4-4725-b331-267836ea4b3e
qemu: unknown option 'type=gpu-process'
qemu: unknown option 'type=utility'
[0709/091840.075841:WARNING:gpu_process_host.cc(1188)] The GPU process has crashed 1 time(s)
qemu: unknown option 'type=gpu-process'
[0709/091840.162766:WARNING:gpu_process_host.cc(1188)] The GPU process has crashed 2 time(s)
qemu: unknown option 'type=gpu-process'
[0709/091840.178481:WARNING:gpu_process_host.cc(1188)] The GPU process has crashed 3 time(s)
qemu: unknown option 'type=gpu-process'
[0709/091840.193563:WARNING:gpu_process_host.cc(1188)] The GPU process has crashed 4 time(s)
qemu: unknown option 'type=gpu-process'
[0709/091840.237669:WARNING:gpu_process_host.cc(1188)] The GPU process has crashed 5 time(s)
qemu: unknown option 'type=utility'
qemu: unknown option 'type=gpu-process'
[0709/091840.280583:WARNING:gpu_process_host.cc(1188)] The GPU process has crashed 6 time(s)
[0709/091840.280793:FATAL:gpu_data_manager_impl_private.cc(894)] The display compositor is frequently crashing. Goodbye.
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
qemu: unknown option 'type=utility'

I get the above log message when I try to run the image in docker on a m1 MacBook pro. The current image is just build for amd64 which does not work as expected on arm64 architecture(m1) @isholgueras could you provide a image that would work on arm64 architecture?

System details:
Macbook Pro
Chip: Apple M1
Memory: 16 GB

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.