Sign inSign up

justinribeiro/lighthouse

By justinribeiro

Updated about 5 years ago

Allows you to run an interactive shell and play with both chrome's headless_shell and lighthouse.

Image
23

100K+

justinribeiro/lighthouse repository overview

Lighthouse in a container

Docker Pulls

Lighthouse analyzes web apps and web pages, collecting modern performance metrics and insights on developer best practices. This container allows you to use lighthouse in conjunction with the --headless option of Chrome M59+.

How to Use

Step 1: Run the container

docker run -itv ~/your-local-dir:/home/chrome/reports --cap-add=SYS_ADMIN justinribeiro/lighthouse

Step 1 Improved: A better way with SECCOMP

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 -itv ~/your-local-dir:/home/chrome/reports --security-opt seccomp=$HOME/chrome.json justinribeiro/lighthouse

Step 2: Run Lighthouse with --chrome-flags

Once you're in the container, using the --chrome-flags option available in lighthouse, we can automatically start Chrome in headless mode within the container light so:

lighthouse --chrome-flags="--headless --disable-gpu" https://justinribeiro.com

I just want to run Chrome headless on 9222 within a container!

Use my other chrome-headless container for that.

Tag summary

Content type

Image

Digest

Size

281.8 MB

Last updated

about 5 years ago

docker pull justinribeiro/lighthouse