Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deepsweet/chromium-headless-remote
🐳 Dockerized Chromium in headless remote debugging mode
https://github.com/deepsweet/chromium-headless-remote
chromium docker headless remote
Last synced: about 2 months ago
JSON representation
🐳 Dockerized Chromium in headless remote debugging mode
- Host: GitHub
- URL: https://github.com/deepsweet/chromium-headless-remote
- Owner: deepsweet
- License: mit
- Archived: true
- Created: 2018-08-01T15:21:49.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-03T18:45:39.000Z (over 4 years ago)
- Last Synced: 2024-08-02T15:54:33.301Z (5 months ago)
- Topics: chromium, docker, headless, remote
- Language: Makefile
- Homepage: https://hub.docker.com/r/deepsweet/chromium-headless-remote/
- Size: 48.8 KB
- Stars: 125
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
**:warning: Deprecated in favor of https://github.com/nextools/images/tree/master/chromium**
---
[![version](https://img.shields.io/badge/chromium-80-green.svg?style=flat-square)](https://packages.ubuntu.com/bionic/chromium-browser) [![hub](https://flat.badgen.net/docker/pulls/deepsweet/chromium-headless-remote?label=pulls)](https://hub.docker.com/r/deepsweet/chromium-headless-remote/) [![size](https://flat.badgen.net/docker/size/deepsweet/chromium-headless-remote?label=size)](https://hub.docker.com/r/deepsweet/chromium-headless-remote/)
Dockerized Chromium in [headless](https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md) [remote debugging mode](https://chromedevtools.github.io/devtools-protocol/).
## Usage
```sh
docker run -it --rm -p 9222:9222 deepsweet/chromium-headless-remote:80
```Example using [Puppeteer](https://github.com/GoogleChrome/puppeteer):
Ensure to match version of `puppeteer-core` to the version of Chromium you are using:
```sh
npm install puppeteer-core@chrome-80
``````js
import fetch from 'node-fetch'
import puppeteer from 'puppeteer-core'const response = await fetch('http://localhost:9222/json/version')
const { webSocketDebuggerUrl } = await response.json()const browser = await puppeteer.connect({ browserWSEndpoint: webSocketDebuggerUrl })
const page = await browser.newPage()await page.goto('https://example.com')
await page.screenshot({ path: 'example.png' })
await browser.close()
```## Fonts
It's possible to mount a folder with custom fonts to be used later by Chromium: add `-v $(pwd)/path/to/fonts:/home/chromium/.fonts` to `docker run` arguments.
## How to update to the newer Chromium version
Docker Hub's Auto Builder is used to create versioned builds. Build instructions are set to look at Git tag value and create a corresponding Dcoker image tag.
To update the version:
1. run `make list`
2. pick newer version and paste it (properly shortened) in [`Makefile`](./Makefile) and [`Dockerfile`](./Dockerfile)
3. commit all changes
4. run `make push`## Related
* [ungoogled-chromium-headless-remote](https://github.com/deepsweet/ungoogled-chromium-headless-remote)
* [firefox-headless-remote](https://github.com/deepsweet/firefox-headless-remote)