Introducing our new CEO Don Johnson - Read More

femtopixel/google-lighthouse

Sponsored OSS

By FemtoPixel

Updated about 1 month ago

Google Lighthouse - Docker Image

Image
Integration & Delivery
Monitoring & Observability
Web Analytics
13

1M+

Github

Issues

Google Lighthouse - Docker Image

latest releaseDocker PullsDocker StarsPayPal donationBuy me a coffeeBuy me a coffee

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

Usage

docker run --rm --name lighthouse -it -v /path/to/your/report:/home/chrome/reports --cap-add=SYS_ADMIN femtopixel/google-lighthouse <your_site_url> <optional_args>

With <you_site_url> 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 --cap-add=SYS_ADMIN femtopixel/google-lighthouse http://www.google.com --output json

Further reading on Google Lighthouse

Usage : Improved

Using the ever-awesome Jessie Frazelle SECCOMP profile for Chrome, we don't have to use the hammer that is SYS_ADMIN:

wget https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/seccomp/chrome.json -O ~/chrome.json
docker run --rm --name lighthouse -it -v /path/to/your/report:/home/chrome/reports --security-opt seccomp=$HOME/chrome.json femtopixel/google-lighthouse <your_site_url>

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)

Docker Pull Command

docker pull femtopixel/google-lighthouse