项目作者: MatthiasWinkelmann

项目描述 :
Run Google's Lighthouse headless in the background
高级语言: Shell
项目地址: git://github.com/MatthiasWinkelmann/lighthouse-chromium-alpine-docker.git
创建时间: 2017-03-07T20:14:59Z
项目社区:https://github.com/MatthiasWinkelmann/lighthouse-chromium-alpine-docker

开源协议:MIT License

下载


lighthouse/chromium/alpine/docker image

Run Google’s Lighthouse headless in the background

This image allows you to quickly run lighthouse in a headless container. That’s useful if you want to run it from a CI server, or in the background of your workstation.

Installation

From Github

Github URL: https://github.com/MatthiasWinkelmann/lighthouse-chromium-alpine-docker

  1. git clone git@github.com:MatthiasWinkelmann/lighthouse-chromium-alpine-docker.git
  2. docker build -t lighthouse lighthouse-chromium-alpine-docker

From Docker Hub

Docker Hub URL: https://hub.docker.com/r/matthiaswinkelmann/lighthouse-chromium-alpine

  1. docker pull matthiaswinkelmann/lighthouse-chromium-alpine

Usage

Processes within the container cannot easily access the host’s file system. You can either print to STDOUT and redirect to a file, or mount a local folder in the container, as shown here:

Quickstart: Print to STDOUT

  1. docker run lighthouse --output-path=stdout https://google.com

Saving to file

  1. docker run -v ./output/:/lighthouse/output/ lighthouse --output-path=/lighthouse/output/results.html --save-assets --save-artifacts https://google.com

Testing

  1. docker run lighthouse test

Canonical URL: https://matthi.coffee/2017/lighthouse-chromium-headless-docker