Skip to content

Commit

Permalink
initial 3.0.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
ddavison committed Oct 12, 2016
1 parent d28dda6 commit c27cd9f
Show file tree
Hide file tree
Showing 23 changed files with 72 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN apt-get update -qqy \
# Selenium
#==========
RUN mkdir -p /opt/selenium \
&& wget --no-verbose https://selenium-release.storage.googleapis.com/2.53/selenium-server-standalone-2.53.1.jar -O /opt/selenium/selenium-server-standalone.jar
&& wget --no-verbose https://selenium-release.storage.googleapis.com/3.0/selenium-server-standalone-3.0.0.jar -O /opt/selenium/selenium-server-standalone.jar

#========================================
# Add normal user with passwordless sudo
Expand Down
2 changes: 1 addition & 1 deletion Hub/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/base:2.53.1-americium
FROM selenium/base:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

#========================
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
NAME := selenium
VERSION := $(or $(VERSION),$(VERSION),'2.53.1')
VERSION := $(or $(VERSION),$(VERSION),'3.0.0-actinium')
PLATFORM := $(shell uname -s)
BUILD_ARGS := $(BUILD_ARGS)

Expand Down
4 changes: 2 additions & 2 deletions NodeBase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/base:2.53.1-americium
FROM selenium/base:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

ENV DEBIAN_FRONTEND noninteractive
Expand All @@ -22,7 +22,7 @@ RUN echo "${TZ}" > /etc/timezone \
RUN apt-get update -qqy \
&& apt-get -qqy install \
xvfb \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

#==============================
# Scripts to run Selenium Node
Expand Down
4 changes: 2 additions & 2 deletions NodeChrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/node-base:2.53.1-americium
FROM selenium/node-base:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

USER root
Expand All @@ -24,7 +24,7 @@ RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key
&& apt-get -qqy install \
${CHROME_VERSION:-google-chrome-stable} \
&& rm /etc/apt/sources.list.d/google-chrome.list \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

#==================
# Chrome webdriver
Expand Down
17 changes: 5 additions & 12 deletions NodeChrome/generate_config
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@
echo "
{
\"capabilities\": [
{
\"browserName\": \"*googlechrome\",
\"maxInstances\": $NODE_MAX_INSTANCES,
\"seleniumProtocol\": \"Selenium\"
},
{
\"browserName\": \"chrome\",
\"maxInstances\": $NODE_MAX_INSTANCES,
\"seleniumProtocol\": \"WebDriver\"
}
],
\"configuration\": {
\"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",
\"maxSession\": $NODE_MAX_SESSION,
\"port\": 5555,
\"register\": true,
\"registerCycle\": $NODE_REGISTER_CYCLE
}
\"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",
\"maxSession\": $NODE_MAX_SESSION,
\"port\": 5555,
\"register\": true,
\"registerCycle\": $NODE_REGISTER_CYCLE
}"

2 changes: 1 addition & 1 deletion NodeChromeDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/node-chrome:2.53.1-americium
FROM selenium/node-chrome:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

USER root
Expand Down
2 changes: 1 addition & 1 deletion NodeChromeDebug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you are running Boot2Docker on Mac then you already have a [VNC client](http:
When you are prompted for the password it is __secret__. If you wish to change this then you should either change it in the `/NodeBase/Dockerfile` and build the images yourself, or you can define a docker image that derives from the posted ones which reconfigures it:

``` dockerfile
FROM selenium/node-chrome-debug:2.53.1
FROM selenium/node-chrome-debug:3.0.0-actinium

RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
```
Expand Down
2 changes: 1 addition & 1 deletion NodeDebug/README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you are running Boot2Docker on Mac then you already have a [VNC client](http:
When you are prompted for the password it is __secret__. If you wish to change this then you should either change it in the `/NodeBase/Dockerfile` and build the images yourself, or you can define a docker image that derives from the posted ones which reconfigures it:

``` dockerfile
FROM selenium/##BASE##-debug:2.53.1
FROM selenium/##BASE##-debug:3.0.0-actinium

RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
```
Expand Down
8 changes: 4 additions & 4 deletions NodeFirefox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/node-base:2.53.1-americium
FROM selenium/node-base:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

USER root

#=========
# Firefox
#=========
ENV FIREFOX_VERSION 47.0.1
ARG FIREFOX_VERSION=47.0.1
RUN apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install firefox \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
&& wget --no-verbose -O /tmp/firefox.tar.bz2 https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2 \
&& apt-get -y purge firefox \
&& rm -rf /opt/firefox \
Expand All @@ -25,7 +25,7 @@ RUN apt-get update -qqy \
#============
# GeckoDriver
#============
ENV GECKODRIVER_VERSION 0.10.0
ARG GECKODRIVER_VERSION=0.10.0
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz \
&& rm -rf /opt/geckodriver \
&& tar -C /opt -zxf /tmp/geckodriver.tar.gz \
Expand Down
17 changes: 5 additions & 12 deletions NodeFirefox/generate_config
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@
echo "
{
\"capabilities\": [
{
\"browserName\": \"*firefox\",
\"maxInstances\": $NODE_MAX_INSTANCES,
\"seleniumProtocol\": \"Selenium\"
},
{
\"browserName\": \"firefox\",
\"maxInstances\": $NODE_MAX_INSTANCES,
\"seleniumProtocol\": \"WebDriver\"
}
],
\"configuration\": {
\"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",
\"maxSession\": $NODE_MAX_SESSION,
\"port\": 5555,
\"register\": true,
\"registerCycle\": $NODE_REGISTER_CYCLE
}
\"proxy\": \"org.openqa.grid.selenium.proxy.DefaultRemoteProxy\",
\"maxSession\": $NODE_MAX_SESSION,
\"port\": 5555,
\"register\": true,
\"registerCycle\": $NODE_REGISTER_CYCLE
}"

10 changes: 5 additions & 5 deletions NodeFirefoxDebug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/node-firefox:2.53.1-americium
FROM selenium/node-firefox:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

USER root
Expand All @@ -13,7 +13,7 @@ USER root
RUN apt-get update -qqy \
&& apt-get -qqy install \
x11vnc \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
&& mkdir -p /root/.vnc \
&& x11vnc -storepasswd secret ~/.vnc/passwd

Expand All @@ -27,7 +27,7 @@ RUN locale-gen en_US.UTF-8 \
&& apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install \
language-pack-en \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

#=======
# Fonts
Expand All @@ -39,7 +39,7 @@ RUN apt-get update -qqy \
xfonts-75dpi \
xfonts-cyrillic \
xfonts-scalable \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

#=========
# fluxbox
Expand All @@ -48,7 +48,7 @@ RUN apt-get update -qqy \
RUN apt-get update -qqy \
&& apt-get -qqy install \
fluxbox \
&& rm -rf /var/lib/apt/lists/*
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*

#==============================
# Scripts to run Selenium Node
Expand Down
2 changes: 1 addition & 1 deletion NodeFirefoxDebug/Dockerfile.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM selenium/node-firefox:2.53.1
FROM selenium/node-firefox:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

USER root
Expand Down
2 changes: 1 addition & 1 deletion NodeFirefoxDebug/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ If you are running Boot2Docker on Mac then you already have a [VNC client](http:
When you are prompted for the password it is __secret__. If you wish to change this then you should either change it in the `/NodeBase/Dockerfile` and build the images yourself, or you can define a docker image that derives from the posted ones which reconfigures it:

``` dockerfile
FROM selenium/node-firefox-debug:2.53.1
FROM selenium/node-firefox-debug:3.0.0-actinium

RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
```
Expand Down
54 changes: 27 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Images included:
When executing docker run for an image with chrome browser please add volume mount `-v /dev/shm:/dev/shm` to use the host's shared memory.

``` bash
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:2.53.1
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.0.0-actinium
```

This is a workaround to node-chrome crash in docker container issue: https://code.google.com/p/chromium/issues/detail?id=519952
Expand All @@ -34,9 +34,9 @@ This is a workaround to node-chrome crash in docker container issue: https://cod
### Standalone Chrome and Firefox

``` bash
$ docker run -d -p 4444:4444 selenium/standalone-chrome:2.53.1
$ docker run -d -p 4444:4444 selenium/standalone-chrome:3.0.0-actinium
# OR
$ docker run -d -p 4444:4444 selenium/standalone-firefox:2.53.1
$ docker run -d -p 4444:4444 selenium/standalone-firefox:3.0.0-actinium
```

_Note: Only one standalone image can run on port_ `4444` _at a time._
Expand All @@ -46,30 +46,30 @@ To inspect visually what the browser is doing use the `standalone-chrome-debug`
### Selenium Grid Hub

``` bash
$ docker run -d -p 4444:4444 --name selenium-hub selenium/hub:2.53.1
$ docker run -d -p 4444:4444 --name selenium-hub selenium/hub:3.0.0-actinium
```

### Chrome and Firefox Grid Nodes

``` bash
$ docker run -d --link selenium-hub:hub selenium/node-chrome:2.53.1
$ docker run -d --link selenium-hub:hub selenium/node-firefox:2.53.1
$ docker run -d --link selenium-hub:hub selenium/node-chrome:3.0.0-actinium
$ docker run -d --link selenium-hub:hub selenium/node-firefox:3.0.0-actinium
```

### JAVA_OPTS Java Environment Options

You can pass `JAVA_OPTS` environment variable to java process.

``` bash
$ docker run -d -p 4444:4444 -e JAVA_OPTS=-Xmx512m --name selenium-hub selenium/hub:2.53.1
$ docker run -d -p 4444:4444 -e JAVA_OPTS=-Xmx512m --name selenium-hub selenium/hub:3.0.0-actinium
```

### SE_OPTS Selenium Configuration Options

You can pass `SE_OPTS` variable with additional commandline parameters for starting a hub or a node.

``` bash
$ docker run -d -p 4444:4444 -e SE_OPTS=-debug --name selenium-hub selenium/hub:2.53.1
$ docker run -d -p 4444:4444 -e SE_OPTS=-debug --name selenium-hub selenium/hub:3.0.0-actinium
```

## Building the images
Expand Down Expand Up @@ -99,10 +99,10 @@ _Note: Omitting_ `VERSION=local` _will build the images with the current version
##### Example: Spawn a container for testing in Chrome:

``` bash
$ docker run -d --name selenium-hub -p 4444:4444 selenium/hub:2.53.1
$ docker run -d --name selenium-hub -p 4444:4444 selenium/hub:3.0.0-actinium
$ CH=$(docker run --rm --name=ch \
--link selenium-hub:hub -v /e2e/uploads:/e2e/uploads \
selenium/node-chrome:2.53.1)
selenium/node-chrome:3.0.0-actinium)
```

_Note:_ `-v /e2e/uploads:/e2e/uploads` _is optional in case you are testing browser uploads on your web app you will probably need to share a directory for this._
Expand All @@ -112,10 +112,10 @@ _Note:_ `-v /e2e/uploads:/e2e/uploads` _is optional in case you are testing brow
This command line is the same as for Chrome. Remember that the Selenium running container is able to launch either Chrome or Firefox, the idea around having 2 separate containers, one for each browser is for convenience plus avoiding certain `:focus` issues your web app may encounter during end-to-end test automation.

``` bash
$ docker run -d --name selenium-hub -p 4444:4444 selenium/hub:2.53.1
$ docker run -d --name selenium-hub -p 4444:4444 selenium/hub:3.0.0-actinium
$ FF=$(docker run --rm --name=fx \
--link selenium-hub:hub -v /e2e/uploads:/e2e/uploads \
selenium/node-firefox:2.53.1)
selenium/node-firefox:3.0.0-actinium)
```

_Note: Since a Docker container is not meant to preserve state and spawning a new one takes less than 3 seconds you will likely want to remove containers after each end-to-end test with_ `--rm` _command. You need to think of your Docker containers as single processes, not as running virtual machines, in case you are familiar with [Vagrant](https://www.vagrantup.com/)._
Expand All @@ -124,28 +124,28 @@ _Note: Since a Docker container is not meant to preserve state and spawning a ne

In the event you wish to visually see what the browser is doing you will want to run the `debug` variant of node or standalone images. A VNC server will run on port 5900. You are free to map that to any free external port that you wish. Example: <port4VNC>: 5900) you will only be able to run 1 node per port so if you wish to include a second node, or more, you will have to use different ports, the 5900 as the internal port will have to remain the same though as thats the VNC service on the node. The second example below shows how to run multiple nodes and with different VNC ports open:
``` bash
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub selenium/node-chrome-debug:2.53.1
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub selenium/node-firefox-debug:2.53.1
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub selenium/node-chrome-debug:3.0.0-actinium
$ docker run -d -P -p <port4VNC>:5900 --link selenium-hub:hub selenium/node-firefox-debug:3.0.0-actinium
```
e.g.:
``` bash
$ docker run -d -P -p 5900:5900 --link selenium-hub:hub selenium/node-chrome-debug:2.53.1
$ docker run -d -P -p 5901:5900 --link selenium-hub:hub selenium/node-firefox-debug:2.53.1
$ docker run -d -P -p 5900:5900 --link selenium-hub:hub selenium/node-chrome-debug:3.0.0-actinium
$ docker run -d -P -p 5901:5900 --link selenium-hub:hub selenium/node-firefox-debug:3.0.0-actinium
```

to connect to the Chrome node on 5900 and the Firefox node on 5901 (assuming those node are free, and reachable).

And for standalone:
``` bash
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 selenium/standalone-chrome-debug:2.53.1
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 selenium/standalone-chrome-debug:3.0.0-actinium
# OR
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 selenium/standalone-firefox-debug:2.53.1
$ docker run -d -p 4444:4444 -p <port4VNC>:5900 selenium/standalone-firefox-debug:3.0.0-actinium
```
or
``` bash
$ docker run -d -p 4444:4444 -p 5900:5900 selenium/standalone-chrome-debug:2.53.1
$ docker run -d -p 4444:4444 -p 5900:5900 selenium/standalone-chrome-debug:3.0.0-actinium
# OR
$ docker run -d -p 4444:4444 -p 5901:5900 selenium/standalone-firefox-debug:2.53.1
$ docker run -d -p 4444:4444 -p 5901:5900 selenium/standalone-firefox-debug:3.0.0-actinium
```

You can acquire the port that the VNC server is exposed to by running:
Expand All @@ -164,8 +164,8 @@ If you are running [Boot2Docker](https://docs.docker.com/installation/mac/) on O

When you are prompted for the password it is `secret`. If you wish to change this then you should either change it in the `/NodeBase/Dockerfile` and build the images yourself, or you can define a Docker image that derives from the posted ones which reconfigures it:
``` dockerfile
#FROM selenium/node-chrome-debug:2.53.1
#FROM selenium/node-firefox-debug:2.53.1
#FROM selenium/node-chrome-debug:3.0.0-actinium
#FROM selenium/node-firefox-debug:3.0.0-actinium
#Choose the FROM statement that works for you.

RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
Expand All @@ -177,11 +177,11 @@ RUN x11vnc -storepasswd <your-password-here> /home/seluser/.vnc/passwd
$ docker images
#=>
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
selenium/node-firefox 2.53.1 69f762d0d79e 29 minutes ago 552.1 MB
selenium/node-chrome 2.53.1 9dd73160660b 30 minutes ago 723.6 MB
selenium/node-base 2.53.1 1b7a0b7024b1 32 minutes ago 426.1 MB
selenium/hub 2.53.1 2570bbb98229 33 minutes ago 394.4 MB
selenium/base 2.53.1 33478d455dab 33 minutes ago 362.6 MB
selenium/node-firefox 3.0.0-actinium 69f762d0d79e 29 minutes ago 552.1 MB
selenium/node-chrome 3.0.0-actinium 9dd73160660b 30 minutes ago 723.6 MB
selenium/node-base 3.0.0-actinium 1b7a0b7024b1 32 minutes ago 426.1 MB
selenium/hub 3.0.0-actinium 2570bbb98229 33 minutes ago 394.4 MB
selenium/base 3.0.0-actinium 33478d455dab 33 minutes ago 362.6 MB
ubuntu 16.04 0b7735b9290f 6 days ago 123.7 MB
```

Expand Down
2 changes: 1 addition & 1 deletion StandaloneChrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED.
# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
FROM selenium/node-chrome:2.53.1-americium
FROM selenium/node-chrome:3.0.0-actinium
MAINTAINER Selenium <selenium-developers@googlegroups.com>

USER root
Expand Down
Loading

0 comments on commit c27cd9f

Please sign in to comment.