Headless Chromium Save

Run headless chromium using golang

Project 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.


$ 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
Open Source Agenda is not affiliated with "Headless Chromium" Project. README Source: YijinLiu/headless-chromium
Open Issues
Last Commit
6 years ago

Open Source Agenda Badge

Open Source Agenda Rating