Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

Commit

Permalink
Upgrade to ubuntu wily-20150731, to Firefox 39.0.3, Chrome path 130, …
Browse files Browse the repository at this point in the history
…to Java 1.8.0_66. Missed FF 36.0.4
  • Loading branch information
elgalu committed Aug 7, 2015
1 parent 107ab61 commit 4211c70
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 63 deletions.
40 changes: 32 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,30 @@ Note sha256 digests are generated after pushing the image to the registry theref

Note image ids also change after scm-source.json has being updated which triggers a cyclic problem so value TBD will be set here and updated in the [release][] page by navigating into any release tag.

## 2.47.1d (2015-08-07)
+ Upgrade from wily-20150708 to 20150731 (Leo Gallucci)
+ Upgrade Firefox from 39.0 to 39.0.3
+ Upgrade Chrome stable patch level from 125 to 130
+ Upgrade Java from 1.8.0_60 to 1.8.0_66
+ Include missed Firefox version 36.0.4
+ Image tag details:
+ Selenium: v2.47.1 (411b314)
+ Chrome stable: 44.0.2403.130
+ Chrome beta: 45.0.2454.26
+ Chrome dev: 46.0.2471.2
+ Firefox versions in this image:
39.0.3 38.0.6 37.0.2 36.0.4
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.17.340116 (2557bebb9de060c37c1a5d8d51ef72bb91106af6)
+ Java: 1.8.0_66-internal OpenJDK 64-Bit 1.8.0_66-b01
+ Timezone: Europe/Berlin
+ Built with: Docker version 1.7.1, build 786b29d
+ FROM ubuntu:wily-20150731
+ Python: 2.7.10
+ Image ID: TBD
+ Digest: sha256:TBD

## 2.47.1c (2015-08-03)
+ Upgrade chromedriver from 2.16 to 2.17 (Leo Gallucci)
+ Upgrade chrome unstable from 45 to 46.0.2467.2
Expand All @@ -15,7 +39,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 45.0.2454.15
+ Chrome dev: 46.0.2467.2
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.17.340116 (2557bebb9de060c37c1a5d8d51ef72bb91106af6)
Expand All @@ -37,7 +61,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 45.0.2454.15
+ Chrome dev: 45.0.2454.15
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
Expand All @@ -59,7 +83,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 44.0.2403.89
+ Chrome dev: 45.0.2454.7
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
Expand All @@ -80,7 +104,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 44.0.2403.89
+ Chrome dev: 45.0.2454.7
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
Expand All @@ -104,7 +128,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 44.0.2403.89
+ Chrome dev: 45.0.2454.7
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
Expand All @@ -126,7 +150,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 44.0.2403.81
+ Chrome dev: 45.0.2454.6
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
Expand All @@ -147,7 +171,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 44.0.2403.81
+ Chrome dev: 45.0.2454.6
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
Expand All @@ -172,7 +196,7 @@ Note image ids also change after scm-source.json has being updated which trigger
+ Chrome beta: 44.0.2403.81
+ Chrome dev: 45.0.2454.6
+ Firefox versions in this image:
39.0 38.0.6 37.0.2 36.0.4
39.0 38.0.6 37.0.2
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
Expand Down
64 changes: 42 additions & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
###################################################
#== Ubuntu wily is 15.10.x, i.e. FROM ubuntu:15.10
# search for more at https://registry.hub.docker.com/_/ubuntu/tags/manage/
FROM ubuntu:wily-20150708
# next: wily-TBD
FROM ubuntu:wily-20150731
ENV UBUNTU_FLAVOR wily

#== Ubuntu vivid is 15.04.x, i.e. FROM ubuntu:15.04
Expand Down Expand Up @@ -176,6 +177,15 @@ RUN apt-get update -qqy \
openbox obconf menu \
&& rm -rf /var/lib/apt/lists/*

#=========
# fluxbox
# A fast, lightweight and responsive window manager
#=========
RUN apt-get update -qqy \
&& apt-get -qqy install \
fluxbox \
&& rm -rf /var/lib/apt/lists/*

#========================================
# Add normal user with passwordless sudo
#========================================
Expand Down Expand Up @@ -394,9 +404,9 @@ RUN pip install --upgrade \
"https://github.com/Supervisor/supervisor/zipball/b3ad59703b554f" \
&& rm -rf /var/lib/apt/lists/*

#-------------------#
# FIREFOX_VERSIONS1 #
#-------------------#
#----------------------------#
# FIREFOX_VERSIONS: 24 to 29 #
#----------------------------#
# Will split firefox versions in smaller chunks so the layers are smaller
# All firefox versions we provide from oldes to newest
ENV FIREFOX_VERSIONS1 "24.0, 25.0.1, 26.0, 27.0.1, 28.0, 29.0.1"
Expand All @@ -413,10 +423,10 @@ RUN cd ${NORMAL_USER_HOME}/firefox-src \
&& rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
;done

#-------------------#
# FIREFOX_VERSIONS2 #
#-------------------#
ENV FIREFOX_VERSIONS2 "30.0, 31.0, 32.0.3, 33.0.3, 34.0.5, 35.0.1"
#----------------------------#
# FIREFOX_VERSIONS: 30 to 34 #
#----------------------------#
ENV FIREFOX_VERSIONS2 "30.0, 31.0, 32.0.3, 33.0.3, 34.0.5"
RUN cd ${NORMAL_USER_HOME}/firefox-src \
&& for FF_VER in $(echo ${FIREFOX_VERSIONS2} | tr "," "\n"); do \
mozdownload --application=firefox \
Expand All @@ -430,12 +440,31 @@ RUN cd ${NORMAL_USER_HOME}/firefox-src \
&& rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
;done

#-------------------#
# FIREFOX_VERSIONS3 #
#-------------------#
#----------------------------#
# FIREFOX_VERSIONS: 35 to 38 #
#----------------------------#
# Latest available firefox version
# ENV FIREFOX_LATEST_VERSION latest #this also wors
ENV FIREFOX_VERSIONS3 "36.0.4, 37.0.2, 38.0.6, 39.0"
ENV FIREFOX_VERSIONS3 "35.0.1, 36.0.4, 37.0.2, 38.0.6"
RUN cd ${NORMAL_USER_HOME}/firefox-src \
&& for FF_VER in $(echo ${FIREFOX_VERSIONS3} | tr "," "\n"); do \
mozdownload --application=firefox \
--locale=${FF_LANG} --retry-attempts=1 \
--platform=linux64 --log-level=WARN --version=${FF_VER} \
&& export FIREFOX_DEST="${SEL_HOME}/firefox-${FF_VER}" \
&& mkdir -p ${FIREFOX_DEST} \
&& mozinstall --app=firefox \
firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
--destination=${FIREFOX_DEST} \
&& rm firefox-${FF_VER}.${FF_LANG}.linux64.tar.bz2 \
;done

#---------------------#
# FIREFOX_VERSIONS 39 #
#---------------------#
# Latest available firefox version
# ENV FIREFOX_LATEST_VERSION latest #this also wors
ENV FIREFOX_VERSIONS3 "39.0.3"
RUN cd ${NORMAL_USER_HOME}/firefox-src \
&& for FF_VER in $(echo ${FIREFOX_VERSIONS3} | tr "," "\n"); do \
mozdownload --application=firefox \
Expand All @@ -451,15 +480,6 @@ RUN cd ${NORMAL_USER_HOME}/firefox-src \
&& chown -R ${NORMAL_USER}:${NORMAL_GROUP} ${SEL_HOME} \
&& chown -R ${NORMAL_USER}:${NORMAL_GROUP} ${NORMAL_USER_HOME}

#=========
# fluxbox
# A fast, lightweight and responsive window manager
#=========
RUN apt-get update -qqy \
&& apt-get -qqy install \
fluxbox \
&& rm -rf /var/lib/apt/lists/*

#=====================
# Use Normal User now
#=====================
Expand Down Expand Up @@ -629,7 +649,7 @@ COPY ./dns/etc/hosts /tmp/hosts
ENV FIREFOX_VERSIONS="${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERSIONS3}" \
# Firefox version to use during run
# For firefox please pick one of $FIREFOX_VERSIONS, default latest
FIREFOX_VERSION="39.0" \
FIREFOX_VERSION="39.0.3" \
# Default chrome flavor, options: stable|beta|unstable
CHROME_FLAVOR="stable" \
# User and home
Expand Down
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Note SeleniumHQ/docker-selenium project is more useful for building selenium gri
In general: add `sudo` only if needed in your environment and `--privileged` if you really need it.

sudo docker run --privileged -p 4444:24444 -p 5920:25900 \
-e VNC_PASSWORD=hola elgalu/selenium:2.47.1c
-e VNC_PASSWORD=hola elgalu/selenium:2.47.1d

### Non-privileged
### Run
Expand All @@ -31,7 +31,7 @@ If your setup is correct, privileged mode and sudo should not be necessary:
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 \
-e VNC_PASSWORD=hola \
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" \
elgalu/selenium:2.47.1c
elgalu/selenium:2.47.1d

Make sure `docker run` finishes with **selenium all done and ready for testing** else you won't be able to start your tests. To perform this check programatically please use this command where `ch` is the name of the container:

Expand Down Expand Up @@ -96,7 +96,7 @@ You can lunch a grid only container via environment variables:

docker run --rm --name=hub -p 4444:24444 -p 5930:25900 -p 2223:22222 \
-p=6081:26080 -e CHROME=false -e FIREFOX=false \
elgalu/selenium:2.47.1c
elgalu/selenium:2.47.1d

The important part above is `-e CHROME=false -e FIREFOX=false` which tells the docker image not run run default chorme and firefox nodes turning the container into a grid-only one.

Expand All @@ -112,7 +112,7 @@ You can lunch a node only container via environment variables:
-p 25550:25550 -p 25551:25551 \
-e GRID=false -e CHROME=true -e FIREFOX=true \
-v $(pwd)/videos:/videos \
elgalu/selenium:2.47.1c
elgalu/selenium:2.47.1d

The important part above is `-e GRID=false` which tells the container to be a node-only node, this this case with 2 browsers `-e CHROME=true -e FIREFOX=true` but could be just 1.

Expand All @@ -137,9 +137,9 @@ There are also additional steps you can take to ensure you're using the correct

You can simply verify that image id is indeed the correct one.

# e.g. full image id for tag 2.47.1c
export IMGID=c627036423aa4fa4baea37b24a8ab6fa08e713935ff771f3e3a45881f4319b21
if docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1c |grep ${IMGID} &> /dev/null; then
# e.g. full image id for tag 2.47.1d
export IMGID=TBD
if docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1d |grep ${IMGID} &> /dev/null; then
echo "Image ID tested ok"
else
echo "Image ID doesn't match"
Expand All @@ -149,8 +149,8 @@ You can simply verify that image id is indeed the correct one.

Given docker.io currently allows to push the same tag image twice this represent a security concern but since docker >= 1.6.2 is possible to fetch the digest sha256 instead of the tag so you can be sure you're using the exact same docker image every time:

# e.g. sha256 for tag 2.47.1c
export SHA=9a0df41fb5228ae6bf184c97b706aec33a453e3190a546cbb9e9fe00ac73128c
# e.g. sha256 for tag 2.47.1d
export SHA=TBD
docker pull elgalu/selenium@sha256:${SHA}

You can find all digests sha256 and image ids per tag in the [CHANGELOG](./CHANGELOG.md) so as of now you just need to trust the sha256 in the CHANGELOG. Bullet proof is to fork this project and build the images yourself if security is a big concern.
Expand All @@ -169,7 +169,7 @@ Host machine, terminal 2:
docker run --rm --name=ch -p=4470:24444 \
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
elgalu/selenium:2.47.1c
elgalu/selenium:2.47.1d

Now when you run your tests instead of connecting. If docker run fails try `xhost +`

Expand All @@ -191,7 +191,7 @@ ANYPORT=0
REMOTE_DOCKER_SRV=localhost
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -p=0.0.0.0:${ANYPORT}:24444 \
-p=0.0.0.0:${ANYPORT}:25900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1c
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1d
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
# Useful if the docker server is running in the cloud. Establish free local ports
Expand All @@ -201,7 +201,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
# it acts as a jump host so my public key is already on that server
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -e SCREEN_HEIGHT=1110 \
-e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" \
elgalu/selenium:2.47.1c
elgalu/selenium:2.47.1d
# -- Common: Wait for the container to start
./host-scripts/wait-docker-selenium.sh ch 7s
Expand Down Expand Up @@ -272,7 +272,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
If you prefer to download the final built image from docker you can pull it, personally I always prefer to build them manually except for the base images like Ubuntu 14.04.2:
docker pull elgalu/selenium:2.47.1c
docker pull elgalu/selenium:2.47.1d
#### 2. Use this image
Expand Down
Loading

0 comments on commit 4211c70

Please sign in to comment.