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

Commit 54d775a

Browse files
author
Leo Gallucci
committed
Upgrade Firefox from 38.0.5 to 39.0 and Chrome patch level from 130 to 132
1 parent 10c3783 commit 54d775a

File tree

5 files changed

+90
-32
lines changed

5 files changed

+90
-32
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,21 @@ Note sha256 digests are generated after pushing the image to the registry theref
44

55
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.
66

7+
## v2.46.0-ff39 (2015-07-08)
8+
+ Upgrade Firefox from 38.0.5 to 39.0 and Chrome patch level from 130 to 132 (Leo Gallucci)
9+
+ Minor improvement to mozdownload and mozInstall for Firefox download
10+
+ Image tag details:
11+
+ Selenium: v2.46.0 (87c69e2)
12+
+ Chrome: 43.0.2357.132
13+
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
14+
+ Firefox: 39.0
15+
+ Java: 1.8.0_45 HotSpot(TM) 64-Bit 1.8.0_45-b14
16+
+ Timezone: Europe/Berlin
17+
+ Built with: Docker version 1.7.0, build 0baf609
18+
+ Python: 2.7.9
19+
+ Digest: sha256:TBD
20+
+ Image ID: TBD
21+
722
## v2.46.0-x11 (2015-06-24)
823
+ Ability to pass extra params to the selenium server via SELENIUM_PARAMS (Rogov Viktor)
924
+ Allow to set -e XE_DISP_NUM so X11 can be redirect to the host (Leo Gallucci)

Dockerfile

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,22 @@
77
# ENV UBUNTU_FLAVOR wily
88

99
#== Ubuntu vivid is 15.04.x, i.e. FROM ubuntu:15.04
10+
# search for more at https://registry.hub.docker.com/_/ubuntu/tags/manage/
11+
# http://cloud-images.ubuntu.com/releases/15.04/
1012
FROM ubuntu:vivid-20150611
1113
ENV UBUNTU_FLAVOR vivid
1214

1315
#== Ubuntu trusty is 14.04.x, i.e. FROM ubuntu:14.04
1416
#== Could also use ubuntu:latest but for the sake I replicating an precise env...
17+
# search for more at https://registry.hub.docker.com/_/ubuntu/tags/manage/
18+
# http://cloud-images.ubuntu.com/releases/14.04/
1519
# FROM ubuntu:14.04.2
1620
# ENV UBUNTU_FLAVOR trusty
1721

1822
#== Ubuntu precise is 12.04.x, i.e. FROM ubuntu:12.04
1923
#== Could also use ubuntu:latest but for the sake I replicating an precise env...
24+
# search for more at https://registry.hub.docker.com/_/ubuntu/tags/manage/
25+
# http://cloud-images.ubuntu.com/releases/12.04/
2026
# FROM ubuntu:precise-20150612
2127
# ENV UBUNTU_FLAVOR precise
2228

@@ -279,6 +285,8 @@ RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
279285
#==========================================================
280286
# Google Chrome - Keep chrome versions as they delete them
281287
#==========================================================
288+
# How to get notified of latest version of chrome:
289+
# https://chrome.google.com/webstore/detail/the-latest-versions-of-go/bibclkcoilbnbnppanidhimphmfbjaab
282290
# TODO: Use Google fingerprint to verify downloads
283291
# http://www.google.de/linuxrepositories/
284292
RUN mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
@@ -315,6 +323,7 @@ USER root
315323
#=========
316324
# TODO
317325
# https://github.com/web-animations/web-animations-js/blob/master/.travis-setup.sh#L50
326+
# https://github.com/elgalu/pastedirectory/blob/master/static/web_components/web-animations-js/tools/android/setup.sh
318327

319328
#==========================
320329
# Mozilla Firefox - Latest
@@ -334,14 +343,17 @@ USER root
334343
# dbus-x11 is needed to avoid http://askubuntu.com/q/237893/134645
335344
# FIREFOX_VERSION can be latest // 38.0 // 37.0 // 37.0.1 // 37.0.2 and so on
336345
# FF_LANG can be either en-US // de // fr and so on
346+
# Regarding the pip packages, see released versions at:
347+
# https://github.com/mozilla/mozdownload/releases
337348
ENV FIREFOX_VERSION latest
338349
ENV FF_LANG "en-US"
339350
RUN apt-get update -qqy \
340351
&& apt-get -qqy install \
341352
python2.7 python-pip python2.7-dev python-openssl \
342353
libssl-dev libffi-dev dbus-x11 \
343354
&& easy_install -U pip \
344-
&& pip install --upgrade mozdownload mozInstall \
355+
&& pip install --upgrade mozInstall==1.12 \
356+
&& pip install --upgrade mozdownload==1.15 \
345357
&& mkdir -p ${NORMAL_USER_HOME}/firefox-src \
346358
&& cd ${NORMAL_USER_HOME}/firefox-src \
347359
&& mozdownload --application=firefox --locale=$FF_LANG --retry-attempts=3 \
@@ -386,9 +398,14 @@ RUN apt-get update -qqy \
386398
# Xdummy: Is like Xvfb but uses an LD_PRELOAD hack to run a stock X server
387399
# - uses a "dummy" video driver
388400
# - with Xpra allows to use extensions like Randr, Composite, Damage
401+
#
402+
# Pyvnc2swf: Is a cross-platform screen recording tool (vnc2swf command)
403+
# - captures screen motion through VNC protocol
404+
# - generates a Shockwave Flash (SWF) movie
389405
RUN apt-get update -qqy \
390406
&& apt-get -qqy install \
391407
x11vnc \
408+
pyvnc2swf \
392409
xvfb \
393410
xorg \
394411
xserver-xorg-video-dummy \

README.md

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Note SeleniumHQ/docker-selenium project is more useful for building selenium gri
1616

1717
In general: add `sudo` only if needed in your environment and `--privileged` if you really need it.
1818

19-
sudo docker run --privileged -p 4444:4444 -p 5900:5900 -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-x11
19+
sudo docker run --privileged -p 4444:4444 -p 5900:5900 -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-ff39
2020

2121
### Non-privileged
2222

@@ -27,7 +27,7 @@ If your setup is correct, privileged mode and sudo should not be necessary:
2727
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 \
2828
-e VNC_PASSWORD=hola -e WITH_GUACAMOLE=false \
2929
-e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" \
30-
elgalu/selenium:v2.46.0-x11
30+
elgalu/selenium:v2.46.0-ff39
3131

3232
Make sure `docker run` finishes with **start.sh all done and ready for testing** else you won't be able to start your tests.
3333
Selenium should be up and running at http://localhost:4470/wd/hub open the web page to confirm is running.
@@ -49,7 +49,7 @@ That's is useful for tunneling else you can stick with `docker exec` to get into
4949

5050
## Security
5151

52-
Starting version [v2.46.0-x11][] the file [scm-source.json](./scm-source.json) is included at the root directory of the generated image with information that helps to comply with auditing requirements to trace the creation of this docker image.
52+
Starting version [v2.46.0-ff39][] the file [scm-source.json](./scm-source.json) is included at the root directory of the generated image with information that helps to comply with auditing requirements to trace the creation of this docker image.
5353

5454
Note [scm-source.json](./scm-source.json) file will always be 1 commit outdated in the repo but will be correct inside the container.
5555

@@ -67,17 +67,17 @@ There are also additional steps you can take to ensure you're using the correct
6767
### Option 1 - Use immutable image digests
6868
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:
6969

70-
# e.g. sha256 for tag v2.46.0-x11
71-
export SHA=8d67d3d15dfd449e94433de46c352ff135f38678ebd6e217b613e7f1770d5490
70+
# e.g. sha256 for tag v2.46.0-ff39
71+
export SHA=TBD
7272
docker pull elgalu/selenium@sha256:${SHA}
7373

7474
### Option 2 - Check the Full Image Id
7575

7676
Verify that image id is indeed correct
7777

78-
# e.g. full image id for tag v2.46.0-x11
79-
export IMGID=247b69cbd53ef323b117362fd8bb7510276c5e9a702d15e8573223b0467538fb
80-
if docker inspect -f='{{.Id}}' elgalu/selenium:v2.46.0-x11 |grep ${IMGID} &> /dev/null; then
78+
# e.g. full image id for tag v2.46.0-ff39
79+
export IMGID=TBD
80+
if docker inspect -f='{{.Id}}' elgalu/selenium:v2.46.0-ff39 |grep ${IMGID} &> /dev/null; then
8181
echo "Image ID tested ok"
8282
else
8383
echo "Image ID doesn't match"
@@ -99,7 +99,7 @@ Host machine, terminal 2:
9999
docker run --rm --name=ch -p=4470:4444 \
100100
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
101101
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
102-
elgalu/selenium:v2.46.0-x11
102+
elgalu/selenium:v2.46.0-ff39
103103

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

@@ -121,7 +121,7 @@ ANYPORT=0
121121
REMOTE_DOCKER_SRV=localhost
122122
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:2222 -p=0.0.0.0:${ANYPORT}:4444 \
123123
-p=0.0.0.0:${ANYPORT}:5900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
124-
-e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:v2.46.0-x11
124+
-e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:v2.46.0-ff39
125125
126126
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
127127
# Useful if the docker server is running in the cloud. Establish free local ports
@@ -131,7 +131,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
131131
# it acts as a jump host so my public key is already on that server
132132
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:2222 -e SCREEN_HEIGHT=1110 \
133133
-e VNC_PASSWORD=hola -e SSH_PUB_KEY="$(cat ~/.ssh/authorized_keys)" \
134-
elgalu/selenium:v2.46.0-x11
134+
elgalu/selenium:v2.46.0-ff39
135135
136136
# -- Common: Wait for the container to start
137137
while ! docker logs ${CONTAINER} 2>&1 | grep \
@@ -203,7 +203,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
203203
204204
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:
205205
206-
docker pull elgalu/selenium:v2.46.0-x11
206+
docker pull elgalu/selenium:v2.46.0-ff39
207207
208208
#### 2. Use this image
209209
@@ -253,6 +253,10 @@ This command line is the same as for Chrome, remember that the selenium running
253253
elgalu/docker-selenium local eab41ff50f72 About an hour ago 931.1 MB
254254
ubuntu 14.04.2 d0955f21bf24 4 weeks ago 188.3 MB
255255
256+
### Who is using docker-selenium?
257+
258+
* [Shoov](http://www.gizra.com/content/phantomjs-chrome-docker-selenium-standalone/)
259+
256260
### Troubleshooting
257261
258262
All output is sent to stdout so it can be inspected by running:
@@ -269,4 +273,4 @@ Container leaves a few logs files to see what happened:
269273
/tmp/local-sel-headless.log
270274
/tmp/selenium-server-standalone.log
271275
272-
[v2.46.0-x11]: https://github.com/elgalu/docker-selenium/releases/tag/v2.46.0-x11
276+
[v2.46.0-ff39]: https://github.com/elgalu/docker-selenium/releases/tag/v2.46.0-ff39

READMELeo.md

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
## Build
22

3-
time (docker build -t="elgalu/selenium:v2.46.0-x11" . ;echo $?;beep)
4-
docker run --rm --name=ch -p=4470:4444 -p=5920:5900 -p=2222:2222 -e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-x11
3+
time (docker build -t="elgalu/selenium:v2.46.0-ff39" . ;echo $?;beep)
4+
docker run --rm --name=ch -p=4470:4444 -p=5920:5900 -p=2222:2222 -e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-ff39
5+
docker run --rm --name=ch --net=host -p=4470:4444 -p=5920:5900 -p=2222:2222 -e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-ff39
56

67
## Transfer used browser source artifacts to keep them in the cloud
78

@@ -11,18 +12,18 @@
1112

1213
## To update image id and digest
1314

14-
docker inspect -f='{{.Id}}' elgalu/selenium:v2.46.0-x11
15+
docker inspect -f='{{.Id}}' elgalu/selenium:v2.46.0-ff39
1516
docker images --digests
1617

1718
## Run with shared dir
1819

1920
docker run --rm --name=ch -p=127.0.0.1:4460:4444 -p=127.0.0.1:5910:5900 \
20-
-v /e2e/uploads:/e2e/uploads elgalu/selenium:v2.46.0-x11
21+
-v /e2e/uploads:/e2e/uploads elgalu/selenium:v2.46.0-ff39
2122
docker run --rm --name=ch -p=4460:4444 -p=5910:5900 \
22-
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:v2.46.0-x11
23+
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:v2.46.0-ff39
2324

2425

25-
docker run --rm --name=ff -p=127.0.0.1:4461:4444 -p=127.0.0.1:5911:5900 -v /e2e/uploads:/e2e/uploads elgalu/selenium:v2.46.0-x11
26+
docker run --rm --name=ff -p=127.0.0.1:4461:4444 -p=127.0.0.1:5911:5900 -v /e2e/uploads:/e2e/uploads elgalu/selenium:v2.46.0-ff39
2627

2728
## Run without shared dir and bind ports to all network interfaces
2829

@@ -45,11 +46,11 @@
4546
## Run without dir and bind to all interfaces
4647
Note anything after the image will be taken as arguments for the cmd/entrypoint
4748

48-
docker run --rm --name=ch -p=0.0.0.0:8813:8484 -p=0.0.0.0:2222:2222 -p=0.0.0.0:4470:4444 -p=0.0.0.0:5920:5900 -e SCREEN_WIDTH=1800 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola -e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" -e WITH_GUACAMOLE=true elgalu/selenium:v2.46.0-x11
49+
docker run --rm --name=ch -p=0.0.0.0:8813:8484 -p=0.0.0.0:2222:2222 -p=0.0.0.0:4470:4444 -p=0.0.0.0:5920:5900 -e SCREEN_WIDTH=1800 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola -e SSH_PUB_KEY="$(cat ~/.ssh/id_rsa.pub)" -e WITH_GUACAMOLE=true elgalu/selenium:v2.46.0-ff39
4950

50-
docker run --rm --name=ch -p=4470:4444 -p=5920:5900 -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-x11
51-
docker run --rm --name=ch -p=4470:4444 -p=5920:5900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:v2.46.0-x11
52-
docker run --rm --name=ch -p=0.0.0.0:4470:4444 -p=0.0.0.0:5920:5900 --add-host myserver.dev:172.17.42.1 elgalu/selenium:v2.46.0-x11
51+
docker run --rm --name=ch -p=4470:4444 -p=5920:5900 -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-ff39
52+
docker run --rm --name=ch -p=4470:4444 -p=5920:5900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:v2.46.0-ff39
53+
docker run --rm --name=ch -p=0.0.0.0:4470:4444 -p=0.0.0.0:5920:5900 --add-host myserver.dev:172.17.42.1 elgalu/selenium:v2.46.0-ff39
5354

5455
However adding a custom host IP to server-selenium.local (e.g. bsele ssh config) is more work:
5556

@@ -58,32 +59,32 @@ However adding a custom host IP to server-selenium.local (e.g. bsele ssh config)
5859

5960
vncv localhost:5920 -Scaling=60% &
6061

61-
docker run --rm --name=ff -p=0.0.0.0:4471:4444 -p=0.0.0.0:5921:5900 elgalu/selenium:v2.46.0-x11
62+
docker run --rm --name=ff -p=0.0.0.0:4471:4444 -p=0.0.0.0:5921:5900 elgalu/selenium:v2.46.0-ff39
6263

6364
Automatic builds not working for me right now, maybe there is an issue with docker registry v1 vs v2
6465
https://registry.hub.docker.com/u/elgalu/docker-selenium/builds_history/31621/
6566

6667
## Push version
6768

6869
docker login
69-
docker push docker.io/elgalu/selenium:v2.46.0-x11 ;echo $?;beep
70-
docker tag elgalu/selenium:v2.46.0-x11 elgalu/selenium:latest
70+
docker push docker.io/elgalu/selenium:v2.46.0-ff39 ;echo $?;beep
71+
docker tag elgalu/selenium:v2.46.0-ff39 elgalu/selenium:latest
7172
docker push docker.io/elgalu/selenium:latest
7273

7374
Not working maybe because it has automated builds enabled but then it fails in the cloud but works locally
7475
https://registry.hub.docker.com/u/elgalu/selenium/tags/manage/
7576

76-
docker push elgalu/selenium:v2.46.0-x11
77-
docker push elgalu/docker-selenium:v2.46.0-x11
78-
docker push docker.io/elgalu/docker-selenium:v2.46.0-x11
77+
docker push elgalu/selenium:v2.46.0-ff39
78+
docker push elgalu/docker-selenium:v2.46.0-ff39
79+
docker push docker.io/elgalu/docker-selenium:v2.46.0-ff39
7980

8081
## Pulling
8182

82-
docker pull registry.hub.docker.com/elgalu/selenium:v2.46.0-x11
83+
docker pull registry.hub.docker.com/elgalu/selenium:v2.46.0-ff39
8384

8485
## Pull
8586

86-
docker run -d --name=max -p=0.0.0.0:4411:4444 -p=0.0.0.0:5911:5900 elgalu/selenium:v2.46.0-x11
87+
docker run -d --name=max -p=0.0.0.0:4411:4444 -p=0.0.0.0:5911:5900 elgalu/selenium:v2.46.0-ff39
8788

8889
How to connect through vnc (need a vnc client)
8990

bin/start-vnc-video

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env bash
2+
3+
# TODO bash cli
4+
5+
# Move to ffmpeg or provide both alternatives
6+
https://trac.ffmpeg.org/wiki/Capture/Desktop
7+
http://www.wikihow.com/Record-Your-Desktop-Using-FFmpeg-on-Ubuntu-Linux
8+
9+
ssh ${BASE_SSH_CMD} start-vnc-video ${VNC2SWF_ENCODING} ${VNC2SWF_FRAMERATE} ${BUILD_NAME} ${VNC2SWF_FILE_EXTENSION}
10+
# uses volume /home/application/shared/envVars.properties
11+
ssh ${BASE_SSH_CMD} stop-vnc-video
12+
13+
# record testing video using password file
14+
vnc2swf -P ${VNC_STORE_PWD_FILE} \
15+
-t ${VNC2SWF_ENCODING} \
16+
-r ${VNC2SWF_FRAMERATE} \
17+
-o ${VNC_VIDEO_FILE} \
18+
-n ${CONTAINER_IP} 5900 >${VNC2SWF_LOG_FILE} 2>&1 &
19+
export VNC2SWF_PID=$!
20+
# -- Common: Wait for vnc2swf to connect
21+
while ! grep "Connected:" ${VNC2SWF_LOG_FILE} >/dev/null; do sleep 0.2; done

0 commit comments

Comments
 (0)