Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/femtopixel/docker-google-lighthouse
Google Lighthouse - Docker Image
https://github.com/femtopixel/docker-google-lighthouse
docker docker-image google google-lighthouse lighthouse multiarch pagespeed performance-testing
Last synced: about 2 hours ago
JSON representation
Google Lighthouse - Docker Image
- Host: GitHub
- URL: https://github.com/femtopixel/docker-google-lighthouse
- Owner: femtopixel
- License: mit
- Created: 2017-11-02T16:52:47.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-06T19:00:16.000Z (2 months ago)
- Last Synced: 2024-09-06T22:23:31.822Z (2 months ago)
- Topics: docker, docker-image, google, google-lighthouse, lighthouse, multiarch, pagespeed, performance-testing
- Language: Dockerfile
- Homepage: https://brands.jaymoulin.me/femtopixel/docker-google-lighthouse
- Size: 110 KB
- Stars: 69
- Watchers: 4
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
> [!CAUTION]
> As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support my work.
> [!NOTE]
> (This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)
> [!TIP]
> THIS REPOSITORY IS AUTO-UPDATED BY [GITHUB-RELEASE-NOTIFIER](https://github.com/femtopixel/github-release-notifier) (https://github.com/femtopixel/github-release-notifier)![logo](logo.png)
Google Lighthouse - Docker Image
================================[![latest release](https://img.shields.io/github/release/femtopixel/docker-google-lighthouse.svg "latest release")](http://github.com/femtopixel/docker-google-lighthouse/releases)
[![Docker Pulls](https://img.shields.io/docker/pulls/femtopixel/google-lighthouse.svg)](https://hub.docker.com/r/femtopixel/google-lighthouse/)
[![Docker Stars](https://img.shields.io/docker/stars/femtopixel/google-lighthouse.svg)](https://hub.docker.com/r/femtopixel/google-lighthouse/)
[![PayPal donation](https://github.com/jaymoulin/jaymoulin.github.io/raw/master/ppl.png "PayPal donation")](https://www.paypal.me/jaymoulin)
[![Buy me a coffee](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png "Buy me a coffee")](https://www.buymeacoffee.com/jaymoulin)
[![Buy me a coffee](https://ko-fi.com/img/githubbutton_sm.svg "Buy me a coffee")](https://www.ko-fi.com/jaymoulin)[Lighthouse](https://developers.google.com/web/tools/lighthouse/) analyzes web apps and web pages, collecting modern performance metrics and insights on developer best practices.
This image is greatly inspired from [Justin RIBEIRO's work](https://github.com/justinribeiro/dockerfiles/tree/master/lighthouse)
Usage
-----```
docker run --rm --name lighthouse -it -v /path/to/your/report:/home/chrome/reports femtopixel/google-lighthouse
```With `` url to your site (e.g. http://www.google.com). You can pass args **AFTER** the `url` if you want to.
For example, you can export as json with this command:
```
docker run --rm --name lighthouse -it -v /path/to/your/report:/home/chrome/reports femtopixel/google-lighthouse http://www.google.com --output json
```You can specify `CHROME_FLAGS` environment variable (`-e` parameter in your docker command) to be used in chrome-flags parameter. (default: `--headless --disable-gpu --no-sandbox`)
Further reading on [Google Lighthouse](https://github.com/GoogleChrome/lighthouse/blob/master/docs/readme.md#using-programmatically)
FAQ
---* Error while writing files
```
Runtime error encountered: { Error: EACCES: permission denied, open '/home/chrome/reports/myawesome_site_admin_heavypage.report.json'
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/home/chrome/reports/myawesome_site_admin_heavypage.report.json' }
```
Make sure your folder has the write right for others (chmod o+w)If the issue still occurs, you may want to add `--disable-shm-dev-usage` Chrome flag (cf. https://stackoverflow.com/questions/69173469/meaning-of-selenium-chromeoptions/69175552#69175552 and https://issues.chromium.org/issues/40517415; thx @kevinbreit - https://github.com/femtopixel/docker-google-lighthouse/issues/25)
You can add this flag with the `-e` flag in your docker command `docker run --rm --name lighthouse -it -e CHROME_FLAGS="--headless --disable-gpu --no-sandbox --ignore-certificate-errors --disable-dev-shm-usage --allow-insecure-localhost --silent" -v /path/to/your/report:/home/chrome/reports femtopixel/google-lighthouse http://www.google.com --output json`