Public | Automated Build

Last pushed: 14 days ago
Short Description
sitespeed.io including Chrome, Firefox & Xvfb
Full Description

sitespeed.io

This Docker get you sitespeed.io with Chrome and Firefox installed.

Usage

The --rm -v "$(pwd)":/sitespeed.io will make the result HTML stored on your host.

Analyze a site and fetch timings using Chrome

docker run --privileged --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io http://www.sitespeed.io/ -b chrome --speedIndex --video

Analyze a site and fetch timings using Firefox

docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io https://www.sitespeed.io/ -b firefox  --speedIndex --video

Pro tip

Always run sitespeed.io on specific version (always do that with Docker) meaning specify the tag after your container name. Then you have control of what versions you are using (both of sitespeed.io and the browsers). In practice, this means you should run it like this:

docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:4.0.0 http://www.sitespeed.io/ -b firefox

If you not use the tag after the container, the latest version will be downloaded and you will not have full control of the exact version.

Configuration

sitespeed.io is highly configurable, check the documentation.

Update your container (use a new version)

Say there's a new release of sitespeed.io and you want to run that, how do you do that? First check the changelog. Are there any changes that will break what you do? If not, just pull the new version (change X.Y.Z to the version you want to use):

docker pull sitespeedio/sitespeed.io:X.Y.Z

And then change where you start your container like this:

docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:X.Y.Z ...
Docker Pull Command
Owner
sitespeedio
Source Repository

Comments (2)
beenanner
5 months ago

@dustinphipps' answer is covered in 1276

Short answer chrome requires the --privilege option

dustinphipps
5 months ago

Browsertime with Chrome does not work at all in version 4.0.4. Running the container with the command:

docker run sitespeedio/sitespeed.io:4.0.4 --browser chrome http://sitespeed.io

...results in the following output:

Google Chrome 54.0.2840.71
Mozilla Firefox 49.0.2
Starting Xvfb ...
[2016-11-11 20:09:56] Versions OS: linux 4.8.6-1-ARCH nodejs: v6.9.1 sitespeed.io: 4.0.4 browsertime: 1.0.0-beta.9 coach: 0.28.4
[2016-11-11 20:09:56] Starting chrome for analysing http://sitespeed.io 3 time(s)
[2016-11-11 20:09:56] Testing url http://sitespeed.io run 1
[2016-11-11 20:10:56] Browser failed to start in time, trying one more time.
[2016-11-11 20:11:56] http://sitespeed.io generated the following error in Browsertime BrowserError: unknown error: Chrome failed to start: crashed
  (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.8.6-1-ARCH x86_64)
  (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 4.8.6-1-ARCH x86_64)
    at BrowsertimeError (/usr/src/app/node_modules/browsertime/lib/support/errors.js:5:5)
    at BrowserError (/usr/src/app/node_modules/browsertime/lib/support/errors.js:13:5)
    at startBrowser.call.catch.tap.tap.catch.catch (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:79:15)
From previous event:
    at SeleniumRunner.start (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:78:13)
    at runIteration (/usr/src/app/node_modules/browsertime/lib/core/engine.js:167:21)
    at Promise.reduce (/usr/src/app/node_modules/browsertime/lib/core/engine.js:242:25)
From previous event:
    at Promise.resolve.tap.tap.tap (/usr/src/app/node_modules/browsertime/lib/core/engine.js:241:17)
From previous event:
    at Engine.run (/usr/src/app/node_modules/browsertime/lib/core/engine.js:240:8)
    at engine.start.then (/usr/src/app/lib/plugins/browsertime/analyzer.js:76:26)
From previous event:
    at Object.analyzeUrl (/usr/src/app/lib/plugins/browsertime/analyzer.js:76:8)
    at Object.processMessage (/usr/src/app/lib/plugins/browsertime/index.js:129:27)
    at queue.process (/usr/src/app/lib/support/queueHandler.js:157:57)
    at drainItem (/usr/src/app/node_modules/concurrent-queue/index.js:92:21)
    at Immediate.drain (/usr/src/app/node_modules/concurrent-queue/index.js:73:84)
    at runCallback (timers.js:637:20)
    at tryOnImmediate (timers.js:610:5)
    at processImmediate [as _immediateCallback] (timers.js:582:5)
    at SeleniumRunner.startBrowser (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:37:10)
    at SeleniumRunner.start (/usr/src/app/node_modules/browsertime/lib/core/seleniumRunner.js:42:25)
    at runIteration (/usr/src/app/node_modules/browsertime/lib/core/engine.js:167:21)
    at Promise.reduce (/usr/src/app/node_modules/browsertime/lib/core/engine.js:242:25)
[2016-11-11 20:11:56] Render HTML for 1 page(s)
[2016-11-11 20:11:57] HTML stored in /sitespeed.io/sitespeed-result/sitespeed.io/2016-11-11-20-09-56
[2016-11-11 20:11:57] Finished analysing http://sitespeed.io