headless-chromium

module
v0.0.0-...-d8d72af Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2017 License: Apache-2.0

README

Headless Chromium

Run headless Chromium as server and talk to it in client using devtools protocol. We don't require installation of Chrome, which makes it suitable for resource constrained environments.

It compiles headless Chromium into binary "hc_server" and generate libraries to start / talk to it. Currently, only Golang library is supported. See go/demos/render for how to use it.

Manual

$ docker run -it --cap-add=SYS_ADMIN --name=hc.${USER} yijinliu/hc:57.0.2987.110

Inside docker:

$ go get github.com/yijinliu/headless-chromium/go/demos/render
$ ./bin/render

Build Docker container

Dev container
$ cd docker/dev
$ make VERSION=57.0.2987.129
HC container
$ docker run -it --cap-add=SYS_ADMIN --name=hcdev.${USER} \
    -v /home/${USER}/projects/headless-chromium:/home/hcdev/external \
    -v /var/run/docker.sock:/var/run/docker.sock \
    -v $(which docker):/usr/bin/docker yijinliu/hc:dev

Inside docker:

$ git config --global user.name "XXX"
$ git config --global user.email "YYY@ZZZ"
$ cd external/docker/hc
$ make VERSION=57.0.2987.110

Directories

Path Synopsis
go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL