├── Dockerfile ├── HISTORY.md ├── LICENSE ├── README.md └── scripts └── start.sh /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:trusty 2 | ENV LC_ALL C 3 | ENV DEBIAN_FRONTEND noninteractive 4 | ENV DEBCONF_NONINTERACTIVE_SEEN true 5 | 6 | MAINTAINER Vincent Voyer 7 | RUN apt-get -y update 8 | RUN apt-get install -y -q software-properties-common wget 9 | RUN add-apt-repository -y ppa:mozillateam/firefox-next 10 | 11 | RUN wget -qO- https://deb.nodesource.com/setup_5.x | sudo bash - 12 | RUN sudo apt-get install -y nodejs 13 | 14 | RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - 15 | RUN echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list 16 | RUN apt-get update -y 17 | RUN apt-get install -y -q \ 18 | firefox \ 19 | google-chrome-beta \ 20 | openjdk-7-jre-headless \ 21 | nodejs \ 22 | x11vnc \ 23 | xvfb \ 24 | xfonts-100dpi \ 25 | xfonts-75dpi \ 26 | xfonts-scalable \ 27 | xfonts-cyrillic 28 | RUN useradd -d /home/seleuser -m seleuser 29 | RUN mkdir -p /home/seleuser/chrome 30 | RUN chown -R seleuser /home/seleuser 31 | RUN chgrp -R seleuser /home/seleuser 32 | 33 | ADD ./scripts/ /home/root/scripts 34 | RUN npm install -g \ 35 | selenium-standalone@5.0.0 \ 36 | phantomjs-prebuilt@2.1.4 && \ 37 | selenium-standalone install 38 | EXPOSE 4444 5999 39 | ENTRYPOINT ["sh", "/home/root/scripts/start.sh"] 40 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | # UNRELEASED 2 | 3 | * upgrade selenium-standalone to 3.0.2 4 | 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 Vincent Voyer 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | docker-selenium-firefox-chrome-beta 2 | =================================== 3 | 4 | A Dockerfile starting a selenium standalone server with Chrome and Firefox beta. 5 | 6 | It exposes: 7 | - selenium standalone server running on `localhost:4444` 8 | - vnc server running on `localhost:5999`, password: `secret` 9 | 10 | Running: 11 | 12 | ```shell 13 | docker pull vvoyer/docker-selenium-firefox-chrome 14 | docker run --privileged -p 4444:4444 -p 5999:5999 -d vvoyer/docker-selenium-firefox-chrome 15 | ``` 16 | 17 | Also see this awesome image: https://github.com/elgalu/docker-selenium 18 | -------------------------------------------------------------------------------- /scripts/start.sh: -------------------------------------------------------------------------------- 1 | export DISPLAY=:99 2 | Xvfb :99 -shmem -screen 0 1366x768x16 & 3 | x11vnc -passwd secret -display :99 -N -forever & 4 | # selenium must be started by a non-root user otherwise chrome can't start 5 | su - seleuser -c "selenium-standalone start" 6 | --------------------------------------------------------------------------------