├── .dockerignore ├── README.md ├── all ├── Dockerfile ├── README.md ├── scripts │ └── start.sh └── selenium-server-standalone-2.48.2.jar ├── base ├── Dockerfile └── README.md ├── browsers ├── all │ ├── Dockerfile │ ├── README.md │ └── scripts │ │ └── start.sh ├── chrome │ ├── Dockerfile │ ├── README.md │ └── scripts │ │ └── start.sh └── firefox │ ├── Dockerfile │ ├── README.md │ └── scripts │ └── start.sh ├── browsertime ├── Dockerfile ├── README.md └── scripts │ └── start.sh ├── chrome ├── Dockerfile ├── README.md ├── scripts │ └── start.sh └── selenium-server-standalone-2.48.2.jar ├── coach ├── .travis.yml ├── Dockerfile ├── README.md └── scripts │ └── start.sh ├── firefox ├── Dockerfile ├── README.md ├── scripts │ └── start.sh └── selenium-server-standalone-2.48.2.jar └── visualmetrics ├── Dockerfile └── VISUALMETRICS_LICENSE /.dockerignore: -------------------------------------------------------------------------------- 1 | .git -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | You will find the [latest Docker file](https://github.com/sitespeedio/sitespeed.io/blob/main/Dockerfile) in the main [sitespeed.io repo](https://github.com/sitespeedio/sitespeed.io). 2 | -------------------------------------------------------------------------------- /all/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sitespeedio/browsers:firefox-45.0-chrome-49.0 2 | 3 | MAINTAINER Peter Hedenskog 4 | 5 | # We need Java for the crawler (soon to be removed we hope) 6 | 7 | # Note: libicu52 is needed for phantomjs 2 8 | 9 | RUN \ 10 | apt-get update && \ 11 | apt-get install -y curl && \ 12 | curl --silent --location https://deb.nodesource.com/setup_4.x | bash - && \ 13 | apt-get install -y \ 14 | default-jre-headless \ 15 | git \ 16 | libicu52 \ 17 | nodejs \ 18 | build-essential --no-install-recommends && \ 19 | wget -N http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip && \ 20 | unzip chromedriver_linux64.zip && \ 21 | rm chromedriver_linux64.zip && \ 22 | chmod +x chromedriver && \ 23 | mv -f chromedriver /usr/bin/chromedriver && \ 24 | npm set progress=false && \ 25 | npm install -g sitespeed.io && npm cache clean && \ 26 | apt-get purge -y curl git build-essential && \ 27 | apt-get clean autoclean && \ 28 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 29 | 30 | ADD ./scripts/ /home/root/scripts 31 | ADD ./selenium-server-standalone-2.48.2.jar /home/root/ 32 | 33 | VOLUME /sitespeed.io 34 | 35 | WORKDIR /sitespeed.io 36 | -------------------------------------------------------------------------------- /all/README.md: -------------------------------------------------------------------------------- 1 | # sitespeed.io 2 | 3 | This Docker get you [sitespeed.io](http://www.sitespeed.io) with Chrome and Firefox installed. 4 | 5 | ## Usage 6 | 7 | The ```--rm -v "$(pwd)":/sitespeed.io``` will make the result HTML stored on your host. 8 | 9 | ### Analyze a site and fetch timings using Chrome 10 | ``` 11 | docker run --privileged --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io sitespeed.io -u http://www.sitespeed.io -b chrome --seleniumServer http://127.0.0.1:4444/wd/hub 12 | ``` 13 | 14 | ### Analyze a site and fetch timings using Firefox 15 | ``` 16 | docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io sitespeed.io -u http://www.sitespeed.io -b firefox --seleniumServer http://127.0.0.1:4444/wd/hub 17 | ``` 18 | 19 | ## Pro tip 20 | 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: 21 | ``` 22 | docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:3.6.0 sitespeed.io -u http://www.sitespeed.io -b firefox --seleniumServer http://127.0.0.1:4444/wd/hub 23 | ``` 24 | 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. 25 | 26 | 27 | ## Configuration 28 | sitespeed.io is highly configurable, check the [documentation](http://www.sitespeed.io/documentation). 29 | 30 | ## Update your container (use a new version) 31 | Say there's a new release of sitespeed.io and you want to run that, how do you do that? First check the [changelog](https://github.com/sitespeedio/sitespeed.io/blob/master/CHANGELOG.md). 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): 32 | 33 | ``` 34 | docker pull sitespeedio/sitespeed.io:X.Y.Z 35 | ``` 36 | 37 | And then change where you start your container like this: 38 | 39 | ``` 40 | docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:X.Y.Z ... 41 | ``` 42 | -------------------------------------------------------------------------------- /all/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | google-chrome-stable --version 6 | # Starting Firefox will get us this message 7 | # GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed 8 | # https://bugzilla.mozilla.org/show_bug.cgi?id=833117 9 | # firefox -version 10 | firefox --version 2>/dev/null 11 | echo 'Starting Xvfb ...' 12 | export DISPLAY=:99 13 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 14 | echo 'Starting Selenium server ... access it at http://127.0.0.1:4444/wd/hub' 15 | 2>/dev/null 1>&2 nohup java -jar /home/root/selenium-server-standalone-2.48.2.jar -Djava.security.egd=file:/dev/./urandom > /tmp/selenium.log & 16 | exec "$@" 17 | -------------------------------------------------------------------------------- /all/selenium-server-standalone-2.48.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sitespeedio/sitespeed.io-docker/d8170db2575e7decf691ae683e06984e8ac5a9bc/all/selenium-server-standalone-2.48.2.jar -------------------------------------------------------------------------------- /base/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | ENV LC_ALL C 4 | ENV DEBIAN_FRONTEND noninteractive 5 | ENV DEBCONF_NONINTERACTIVE_SEEN true 6 | 7 | MAINTAINER Peter Hedenskog 8 | 9 | # Setting up sitespeed.io without browsers on Ubuntu 10 | # We need Java for the crawler (soon to be removed we hope) 11 | 12 | # Note: libicu52 is needed for phantomjs 2 13 | RUN \ 14 | apt-get update && \ 15 | apt-get install -y curl && \ 16 | curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash - && \ 17 | apt-get install -y \ 18 | default-jre-headless \ 19 | git \ 20 | nodejs \ 21 | libicu52 --no-install-recommends && \ 22 | npm set progress=false && \ 23 | npm install -g sitespeed.io && npm cache clean && \ 24 | apt-get purge -y curl git && \ 25 | apt-get clean autoclean && \ 26 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 27 | 28 | VOLUME /sitespeed.io 29 | 30 | WORKDIR /sitespeed.io 31 | -------------------------------------------------------------------------------- /base/README.md: -------------------------------------------------------------------------------- 1 | # sitespeed.io 2 | 3 | This Docker get you [sitespeed.io](http://www.sitespeed.io) without any browsers. 4 | 5 | ## Usage 6 | 7 | The ```--rm -v "$(pwd)":/sitespeed.io``` will make the result HTML stored on your host. 8 | 9 | ### Analyze a site 10 | ``` 11 | docker run --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io-standalone sitespeed.io -u http://www.sitespeed.io 12 | ``` 13 | 14 | ## Configuration 15 | sitespeed.io is highly configurable, check the [documentation](http://www.sitespeed.io/documentation). Note: Fetching timings using SlimerJS will need Xvfb, check the browser containers on how to include it. 16 | -------------------------------------------------------------------------------- /browsers/all/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sitespeedio/chrome:51.0 2 | 3 | MAINTAINER Peter Hedenskog 4 | 5 | RUN \ 6 | apt-get update && \ 7 | apt-get install -y firefox --no-install-recommends && \ 8 | apt-get clean autoclean && \ 9 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 10 | 11 | ADD ./scripts/ /home/root/scripts 12 | 13 | ENTRYPOINT ["/home/root/scripts/start.sh"] 14 | -------------------------------------------------------------------------------- /browsers/all/README.md: -------------------------------------------------------------------------------- 1 | # Chrome, Firefox & Xvfb 2 | 3 | This Docker get you Chrome, Firefox and Xvfb installed. 4 | -------------------------------------------------------------------------------- /browsers/all/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | google-chrome-stable --version 6 | # Starting Firefox will get us this message 7 | # GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed 8 | # https://bugzilla.mozilla.org/show_bug.cgi?id=833117 9 | # firefox -version 10 | firefox --version 2>/dev/null 11 | echo 'Starting Xvfb ...' 12 | export DISPLAY=:99 13 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 14 | exec "$@" 15 | -------------------------------------------------------------------------------- /browsers/chrome/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | ENV LC_ALL C 4 | ENV DEBIAN_FRONTEND noninteractive 5 | ENV DEBCONF_NONINTERACTIVE_SEEN true 6 | 7 | MAINTAINER Peter Hedenskog 8 | 9 | # Woho, this is a long run to try to keep the image as small as possible 10 | 11 | RUN \ 12 | apt-get update && \ 13 | apt-get install -y wget unzip && \ 14 | wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ 15 | echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list && \ 16 | apt-get update && apt-get install -y \ 17 | ca-certificates \ 18 | libgl1-mesa-dri \ 19 | xfonts-100dpi \ 20 | xfonts-75dpi \ 21 | xfonts-scalable \ 22 | xfonts-cyrillic \ 23 | xvfb --no-install-recommends && \ 24 | apt-get purge -y wget unzip && \ 25 | apt-get install -y \ 26 | google-chrome-stable && \ 27 | apt-get clean autoclean && \ 28 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 29 | 30 | # Can't get --no-install-recommends to work for chrome-stable 31 | # fix https://code.google.com/p/chromium/issues/detail?id=318548 32 | # RUN mkdir -p /usr/share/desktop-directories 33 | 34 | ADD ./scripts/ /home/root/scripts 35 | 36 | ENTRYPOINT ["/home/root/scripts/start.sh"] 37 | -------------------------------------------------------------------------------- /browsers/chrome/README.md: -------------------------------------------------------------------------------- 1 | # Chrome & Xvfb 2 | 3 | This Docker get you Chrome and Xvfb installed. 4 | -------------------------------------------------------------------------------- /browsers/chrome/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | google-chrome-stable --version 6 | 7 | echo 'Starting Xvfb ...' 8 | export DISPLAY=:99 9 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 10 | exec "$@" 11 | -------------------------------------------------------------------------------- /browsers/firefox/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | ENV LC_ALL C 4 | ENV DEBIAN_FRONTEND noninteractive 5 | ENV DEBCONF_NONINTERACTIVE_SEEN true 6 | 7 | MAINTAINER Peter Hedenskog 8 | 9 | # firefox 10 | 11 | RUN \ 12 | apt-get update && \ 13 | apt-get install -y \ 14 | firefox \ 15 | ca-certificates \ 16 | xfonts-100dpi \ 17 | xfonts-75dpi \ 18 | xfonts-scalable \ 19 | xfonts-cyrillic \ 20 | xvfb --no-install-recommends && \ 21 | apt-get clean autoclean && \ 22 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 23 | 24 | ADD ./scripts/ /home/root/scripts 25 | 26 | ENTRYPOINT ["/home/root/scripts/start.sh"] 27 | -------------------------------------------------------------------------------- /browsers/firefox/README.md: -------------------------------------------------------------------------------- 1 | # Firefox & Xvfb 2 | 3 | This Docker get you Firefox & Xvfb installed. 4 | -------------------------------------------------------------------------------- /browsers/firefox/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | # Starting Firefox will get us this message 6 | # GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed 7 | # https://bugzilla.mozilla.org/show_bug.cgi?id=833117 8 | # firefox -version 9 | firefox --version 2>/dev/null 10 | echo 'Starting Xvfb ...' 11 | export DISPLAY=:99 12 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 13 | exec "$@" 14 | -------------------------------------------------------------------------------- /browsertime/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sitespeedio/visualmetrics 2 | 3 | MAINTAINER Peter Hedenskog 4 | 5 | RUN apt-get update -y && apt-get install -y \ 6 | build-essential \ 7 | ca-certificates \ 8 | curl \ 9 | gcc \ 10 | default-jre-headless \ 11 | --no-install-recommends --force-yes && rm -rf /var/lib/apt/lists/* 12 | 13 | # Install nodejs 14 | RUN curl --silent --location https://deb.nodesource.com/setup_4.x | bash - && \ 15 | apt-get install nodejs -y 16 | 17 | # And get Browsertime 18 | RUN npm install browsertime@1.0.0-alpha.17 -g 19 | 20 | ADD ./scripts/ /home/root/scripts 21 | 22 | VOLUME /browsertime 23 | 24 | WORKDIR /browsertime 25 | -------------------------------------------------------------------------------- /browsertime/README.md: -------------------------------------------------------------------------------- 1 | # browsertime 2 | 3 | This Docker get you [Browsertime](https://github.com/tobli/browsertime) 1.0.0-alpha with Chrome and Firefox installed. 4 | 5 | ## Usage 6 | 7 | The ```--rm -v "$(pwd)":/browsertime``` will make the result stored on your host. 8 | 9 | ### Timings using Chrome 10 | ``` 11 | docker run --privileged -v "$(pwd)":/browsertime sitespeedio/browsertime browsertime https://www.sitespeed.io -b chrome --experimental.video 12 | ``` 13 | 14 | ### Timings using Firefox 15 | ``` 16 | docker run --privileged -v "$(pwd)":/browsertime sitespeedio/browsertime browsertime https://www.sitespeed.io -b firefox --experimental.video 17 | ``` 18 | -------------------------------------------------------------------------------- /browsertime/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | google-chrome-stable --version 6 | # Starting Firefox will get us this message 7 | # GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed 8 | # https://bugzilla.mozilla.org/show_bug.cgi?id=833117 9 | # firefox -version 10 | firefox --version 2>/dev/null 11 | echo 'Starting Xvfb ...' 12 | export DISPLAY=:99 13 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 14 | exec "$@" 15 | -------------------------------------------------------------------------------- /chrome/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sitespeedio/chrome:48.0 2 | 3 | MAINTAINER Peter Hedenskog 4 | 5 | # We need Java for the crawler (soon to be removed we hope) 6 | # Note: libicu52 is needed for phantomjs 2 7 | RUN \ 8 | apt-get update && \ 9 | apt-get install -y curl && \ 10 | curl --silent --location https://deb.nodesource.com/setup_4.x | bash - && \ 11 | apt-get install -y \ 12 | default-jre-headless \ 13 | git \ 14 | libicu52 \ 15 | nodejs \ 16 | build-essential --no-install-recommends && \ 17 | wget -N http://chromedriver.storage.googleapis.com/2.20/chromedriver_linux64.zip && \ 18 | unzip chromedriver_linux64.zip && \ 19 | rm chromedriver_linux64.zip && \ 20 | chmod +x chromedriver && \ 21 | mv -f chromedriver /usr/bin/chromedriver && \ 22 | npm set progress=false && \ 23 | npm install -g sitespeed.io && npm cache clean && \ 24 | apt-get purge -y curl git build-essential && \ 25 | apt-get clean autoclean && \ 26 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 27 | 28 | ADD ./scripts/ /home/root/scripts 29 | ADD ./selenium-server-standalone-2.48.2.jar /home/root/ 30 | 31 | VOLUME /sitespeed.io 32 | 33 | WORKDIR /sitespeed.io 34 | -------------------------------------------------------------------------------- /chrome/README.md: -------------------------------------------------------------------------------- 1 | # sitespeed.io 2 | 3 | This Docker get you [sitespeed.io](http://www.sitespeed.io) with Chrome and Xvfb installed. 4 | 5 | ## Usage 6 | 7 | The ```--rm -v "$(pwd)":/sitespeed.io``` will make the result HTML stored on your host. 8 | 9 | ### Analyze a site and fetch timings using Chrome 10 | ``` 11 | docker run --privileged --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io-chrome sitespeed.io -u http://www.sitespeed.io -b chrome --seleniumServer http://127.0.0.1:4444/wd/hub 12 | ``` 13 | 14 | ## Configuration 15 | sitespeed.io is highly configurable, check the [documentation](http://www.sitespeed.io/documentation). 16 | -------------------------------------------------------------------------------- /chrome/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | chromedriver --version 6 | google-chrome-stable --version 7 | 8 | echo 'Starting Xvfb ...' 9 | export DISPLAY=:99 10 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 11 | echo 'Starting Selenium server ... access it at http://127.0.0.1:4444/wd/hub' 12 | 2>/dev/null 1>&2 nohup java -jar /home/root/selenium-server-standalone-2.48.2.jar -Djava.security.egd=file:/dev/./urandom > /tmp/selenium.log & 13 | exec "$@" 14 | -------------------------------------------------------------------------------- /chrome/selenium-server-standalone-2.48.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sitespeedio/sitespeed.io-docker/d8170db2575e7decf691ae683e06984e8ac5a9bc/chrome/selenium-server-standalone-2.48.2.jar -------------------------------------------------------------------------------- /coach/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | 3 | language: nodejs 4 | 5 | services: 6 | - docker 7 | 8 | before_install: 9 | - docker build -t sitespeedio/coach . 10 | - docker ps -a 11 | 12 | script: 13 | - docker run sitespeedio/coach webcoach https://www.sitespeed.io -b firefox 14 | - docker run sitespeedio/coach webcoach https://www.sitespeed.io -b chrome 15 | -------------------------------------------------------------------------------- /coach/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sitespeedio/browsers:firefox-45.0-chrome-49.0 2 | 3 | MAINTAINER Peter Hedenskog 4 | 5 | RUN \ 6 | apt-get update && \ 7 | apt-get install -y curl && \ 8 | curl --silent --location https://deb.nodesource.com/setup_4.x | bash - && \ 9 | apt-get install -y \ 10 | nodejs \ 11 | build-essential --no-install-recommends && \ 12 | npm set progress=false && \ 13 | npm install -g webcoach && npm cache clean && \ 14 | apt-get purge -y curl git build-essential && \ 15 | apt-get clean autoclean && \ 16 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 17 | 18 | ADD ./scripts/ /home/root/scripts 19 | 20 | VOLUME /coach 21 | 22 | WORKDIR /coach 23 | -------------------------------------------------------------------------------- /coach/README.md: -------------------------------------------------------------------------------- 1 | # The coach 2 | 3 | This is the [coach](https://github.com/sitespeedio/coach) with Chrome and Firefox installed. 4 | 5 | ![The coach logo](https://github.com/sitespeedio/coach/raw/master/img/coach.png) 6 | 7 | ## Usage 8 | Read the [docs](https://github.com/sitespeedio/coach) at Github. 9 | 10 | ### Analyze a site using Firefox 11 | ``` 12 | docker run --rm sitespeedio/coach https://www.sitespeed.io 13 | ``` 14 | 15 | ### Analyze a page using Chrome 16 | ``` 17 | docker run --privileged --rm sitespeedio/coach https://www.sitespeed.io -b chrome 18 | ``` 19 | 20 | ### Drop the output to a file 21 | ``` 22 | docker run --rm -v "$(pwd)":/coach sitespeedio/coach https://www.sitespeed.io -o advice.json -f json 23 | ``` 24 | -------------------------------------------------------------------------------- /coach/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | chromedriver --version 6 | google-chrome-stable --version 7 | # Starting Firefox will get us this message 8 | # GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed 9 | # https://bugzilla.mozilla.org/show_bug.cgi?id=833117 10 | # firefox -version 11 | firefox --version 2>/dev/null 12 | echo 'Starting Xvfb ...' 13 | export DISPLAY=:99 14 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 15 | exec "$@" 16 | -------------------------------------------------------------------------------- /firefox/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sitespeedio/firefox:45.0 2 | 3 | MAINTAINER Peter Hedenskog 4 | 5 | # We need Java for the crawler (soon to be removed we hope) 6 | # Note: libicu52 is needed for phantomjs 2 7 | 8 | RUN \ 9 | apt-get update && \ 10 | apt-get install -y curl && \ 11 | curl --silent --location https://deb.nodesource.com/setup_4.x | bash - && \ 12 | apt-get install -y \ 13 | default-jre-headless \ 14 | git \ 15 | libicu52 \ 16 | nodejs \ 17 | build-essential --no-install-recommends && \ 18 | npm set progress=false && \ 19 | npm install -g sitespeed.io && npm cache clean && \ 20 | apt-get purge -y curl git build-essential && \ 21 | apt-get clean autoclean && \ 22 | rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* 23 | 24 | ADD ./scripts/ /home/root/scripts 25 | ADD ./selenium-server-standalone-2.48.2.jar /home/root/ 26 | 27 | VOLUME /sitespeed.io 28 | 29 | WORKDIR /sitespeed.io 30 | -------------------------------------------------------------------------------- /firefox/README.md: -------------------------------------------------------------------------------- 1 | # sitespeed.io 2 | 3 | This Docker get you [sitespeed.io](http://www.sitespeed.io) with Firefox & Xvfb installed. 4 | 5 | ## Usage 6 | 7 | The ```--rm -v "$(pwd)":/sitespeed.io``` will make the result HTML stored on your host. 8 | 9 | ### Analyze a site and fetch timings using Firefox 10 | ``` 11 | docker run --privileged --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io-firefox sitespeed.io -u http://www.sitespeed.io -b firefox --seleniumServer http://127.0.0.1:4444/wd/hub 12 | ``` 13 | 14 | ## Configuration 15 | sitespeed.io is highly configurable, check the [documentation](http://www.sitespeed.io/documentation). 16 | -------------------------------------------------------------------------------- /firefox/scripts/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | date 4 | # print versions 5 | # Starting Firefox will get us this message 6 | # GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed 7 | # https://bugzilla.mozilla.org/show_bug.cgi?id=833117 8 | # firefox -version 9 | firefox --version 2>/dev/null 10 | echo 'Starting Xvfb ...' 11 | export DISPLAY=:99 12 | 2>/dev/null 1>&2 Xvfb :99 -shmem -screen 0 1366x768x16 & 13 | echo 'Starting Selenium server ... access it at http://127.0.0.1:4444/wd/hub' 14 | 2>/dev/null 1>&2 nohup java -jar /home/root/selenium-server-standalone-2.48.2.jar -Djava.security.egd=file:/dev/./urandom > /tmp/selenium.log & 15 | exec "$@" 16 | -------------------------------------------------------------------------------- /firefox/selenium-server-standalone-2.48.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sitespeedio/sitespeed.io-docker/d8170db2575e7decf691ae683e06984e8ac5a9bc/firefox/selenium-server-standalone-2.48.2.jar -------------------------------------------------------------------------------- /visualmetrics/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM sitespeedio/browsers:firefox-46.0-chrome-51.0 2 | MAINTAINER Peter Hedenskog 3 | 4 | # Lets install all dependencies for VisualMetrics 5 | RUN apt-get update -y && apt-get install -y \ 6 | git \ 7 | imagemagick \ 8 | ipython \ 9 | ipython-notebook \ 10 | libjpeg-dev \ 11 | python \ 12 | python-dev \ 13 | python-imaging \ 14 | python-numpy \ 15 | python-scipy \ 16 | python-matplotlib \ 17 | python-pandas \ 18 | python-pip \ 19 | python-sympy \ 20 | python-nose \ 21 | wget \ 22 | xz-utils \ 23 | --no-install-recommends --force-yes && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ 24 | pip install Pillow && \ 25 | pip install pyssim 26 | 27 | # Install a static version of FFMPEG 28 | RUN wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz && \ 29 | tar xf ffmpeg-release-64bit-static.tar.xz && \ 30 | mv ffmpeg*/ffmpeg /usr/bin/ && \ 31 | rm ffmpeg-release-64bit-static.tar.xz 32 | 33 | # And get VisualMetrics 34 | # RUN git clone https://github.com/WPO-Foundation/visualmetrics.git 35 | 36 | WORKDIR visualmetrics 37 | 38 | # CMD ["python", "/visualmetrics/visualmetrics.py", "--check"] 39 | -------------------------------------------------------------------------------- /visualmetrics/VISUALMETRICS_LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, 5 | are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright notice, 10 | this list of conditions and the following disclaimer in the documentation 11 | and/or other materials provided with the distribution. 12 | * Neither the name of the company nor the names of its contributors may be 13 | used to endorse or promote products derived from this software without 14 | specific prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 17 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 18 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 19 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 20 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 21 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 22 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 23 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 24 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 25 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 26 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --------------------------------------------------------------------------------