Skip to content

AverageMarcus/docker-lighthouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-lighthouse

Run Google's lighthouse tests against a given website using the magic of Docker

Example Usage

Simple score

❯ docker run -e URL=https://bbc.co.uk averagemarcus/lighthouse
Running Lighthouse against https://bbc.co.uk

Lighthouse results for https://bbc.co.uk

performance=57.88%
pwa=45.45%
accessibility=93.26%
best-practices=75.00%
seo=80.00%

JSON Results

❯ docker run -e URL=https://bbc.co.uk -v $(pwd)/results:/lighthouse-results averagemarcus/lighthouse
Running Lighthouse against https://bbc.co.uk

Lighthouse results for https://bbc.co.uk

performance=57.88%
pwa=45.45%
accessibility=93.26%
best-practices=75.00%
seo=80.00%

❯ ls results
2018-05-14T16:43:07.959Z.json latest.json

Extending this image

FROM averagemarcus/lighthouse

ENTRYPOINT /docker-entrypoint.sh && ls /lighthouse-results

Generating lighthouse badges

To have lighthouse badges automatically created, pass in -e withBadges=true and a mount volume when running. E.g.

❯ docker run -e URL=https://bbc.co.uk -e withBadges=true -v $(pwd)/results:/lighthouse-results averagemarcus/lighthouse

About

Run Google's lighthouse tests against a given website using the magic of Docker

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published