Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/deepsweet/firefox-headless-remote
🐳 Dockerized Firefox in headless Marionette mode
https://github.com/deepsweet/firefox-headless-remote
docker firefox headless marionette remote
Last synced: 3 months ago
JSON representation
🐳 Dockerized Firefox in headless Marionette mode
- Host: GitHub
- URL: https://github.com/deepsweet/firefox-headless-remote
- Owner: deepsweet
- License: mit
- Created: 2018-08-08T17:10:04.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-10T15:07:03.000Z (almost 3 years ago)
- Last Synced: 2023-04-10T00:13:46.794Z (almost 2 years ago)
- Topics: docker, firefox, headless, marionette, remote
- Language: JavaScript
- Homepage: https://hub.docker.com/r/deepsweet/firefox-headless-remote/
- Size: 24.4 KB
- Stars: 15
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
Awesome Lists containing this project
README
[![version](https://img.shields.io/badge/firefox-68-green.svg?style=flat-square)](https://packages.ubuntu.com/disco/firefox) [![build](https://img.shields.io/docker/build/deepsweet/firefox-headless-remote.svg?label=build&style=flat-square)](https://hub.docker.com/r/deepsweet/firefox-headless-remote/) [![size](https://img.shields.io/microbadger/image-size/deepsweet/firefox-headless-remote.svg?label=size&style=flat-square)](https://microbadger.com/images/deepsweet/firefox-headless-remote)
Dockerized Firefox in headless [Marionette](https://vakila.github.io/blog/marionette-act-i-automation/) mode.
## Usage
```sh
docker pull deepsweet/firefox-headless-remote:68
docker run -it --rm --shm-size 2g -p 2828:2828 deepsweet/firefox-headless-remote:68
```Example using [Foxr](https://github.com/deepsweet/foxr):
```js
import foxr from 'foxr'(async () => {
try {
const browser = await foxr.connect()
const page = await browser.newPage()await page.goto('https://example.com')
await page.screenshot({ path: 'example.png' })
await browser.close()
} catch (error) {
console.error(error)
}
})()
```## Fonts
It's possible to mount a folder with custom fonts to be used later by Firefox: add `-v $(pwd)/path/to/fonts:/home/firefox/.fonts` to `docker run` arguments.
## Related
* [chromium-headless-remote](https://github.com/deepsweet/chromium-headless-remote)
* [ungoogled-chromium-headless-remote](https://github.com/deepsweet/ungoogled-chromium-headless-remote)