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

Commit 3f380fa

Browse files
committed
Upgrade Firefox 40.0.3, chromedriver 2.19
1 parent 4919d92 commit 3f380fa

File tree

6 files changed

+66
-39
lines changed

6 files changed

+66
-39
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ README-Zala.md
77
videos/
88
android/
99
binaries
10+
*.md

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,28 @@ How to get container versions
1313
google-chrome-unstable --version && echo "\n"
1414
sc | grep build && BrowserStackLocal -version
1515

16+
## 2.47.1h (2015-08-28)
17+
+ Upgrade Firefox 40.0.3, Chrome flavors, chromedriver 2.19 (Leo Gallucci)
18+
+ Image tag details:
19+
+ Selenium: v2.47.1 (411b314)
20+
+ Chrome stable: 44.0.2403.157
21+
+ Chrome beta: 45.0.2454.78
22+
+ Chrome dev (unstable): 46.0.2490.6
23+
+ Firefox versions in this image:
24+
40.0.3 39.0.3 38.0.6 37.0.2 36.0.4
25+
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
26+
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
27+
+ Chromedriver: 2.19.346067 (6abd8652f8bc7a1d825962003ac88ec6a37a82f1)
28+
+ Java: 1.8.0_66-internal OpenJDK 64-Bit 1.8.0_66-b01
29+
+ Timezone: Europe/Berlin
30+
+ Built with: Docker version 1.8.1, build d12ea79
31+
+ FROM ubuntu:wily-20150807
32+
+ Python: 2.7.10
33+
+ Sauce Connect 4.3.11, build 1757 2b421bb
34+
+ BrowserStack Local version 3.7
35+
+ Image ID: TBD
36+
+ Digest: sha256:TBD
37+
1638
## 2.47.1g (2015-08-24)
1739
+ Optionally do `sc --doctor` via SAUCE_TUNNEL_DOCTOR_TEST (Leo Gallucci)
1840
+ Fix small tiny 64mb shm issue via SHM_SIZE and `--privileged` mode.

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ RUN cd /tmp \
526526
#---------------------#
527527
# Latest available firefox version
528528
# ENV FIREFOX_LATEST_VERSION latest #this also wors
529-
ENV FIREFOX_VERSIONS3 "40.0.2"
529+
ENV FIREFOX_VERSIONS3 "40.0.3"
530530
RUN cd ${NORMAL_USER_HOME}/firefox-src \
531531
&& for FF_VER in $(echo ${FIREFOX_VERSIONS3} | tr "," "\n"); do \
532532
mozdownload --application=firefox \
@@ -571,7 +571,7 @@ ENV CHROME_DRIVER_BASE chromedriver.storage.googleapis.com
571571
# Gets latest chrome driver version. Or you can hard-code it, e.g. 2.15
572572
RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
573573
# 1st dup line CHROME_DRIVER_VERSION is just to invalidate docker cache
574-
&& CHROME_DRIVER_VERSION="2.18" \
574+
&& CHROME_DRIVER_VERSION="2.19" \
575575
# && CHROME_DRIVER_VERSION=$(curl 'http://chromedriver.storage.googleapis.com/LATEST_RELEASE' 2> /dev/null) \
576576
&& CHROME_DRIVER_URL="${CHROME_DRIVER_BASE}/${CHROME_DRIVER_VERSION}/${CHROME_DRIVER_FILE}" \
577577
&& wget --no-verbose -O chromedriver_linux${CPU_ARCH}.zip ${CHROME_DRIVER_URL} \
@@ -715,7 +715,7 @@ COPY ./dns/etc/hosts /tmp/hosts
715715
ENV FIREFOX_VERSIONS="${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERSIONS3}" \
716716
# Firefox version to use during run
717717
# For firefox please pick one of $FIREFOX_VERSIONS, default latest
718-
FIREFOX_VERSION="40.0.2" \
718+
FIREFOX_VERSION="40.0.3" \
719719
# Default chrome flavor, options: stable|beta|unstable
720720
CHROME_FLAVOR="stable" \
721721
# User and home

README.md

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

1818
### One-liner Install & Usage
1919

20-
In general: add `sudo` only if needed in your environment and `--privileged` if you really need it like when [Chrome crashes](https://github.com/elgalu/docker-selenium/issues/20) during your high gpu intensive tests.
20+
In general: add `sudo` only if needed in your environment and `--privileged` or `-v /dev/shm:/dev/shm` if you really need it like when [Chrome crashes](https://github.com/elgalu/docker-selenium/issues/20) during your high gpu intensive tests.
2121

22-
docker run --privileged -p 4444:24444 -p 5920:25900 \
23-
-e VNC_PASSWORD=hola elgalu/selenium:2.47.1g
22+
docker run -p 4444:24444 -p 5920:25900 -v /dev/shm:/dev/shm \
23+
-e VNC_PASSWORD=hola elgalu/selenium:2.47.1h
2424

2525
### Non-privileged
2626
### Run
2727

2828
If your setup is correct, privileged mode and sudo should not be necessary:
2929

3030
docker run --rm --name=ch -p=4444:24444 -p=5920:25900 \
31-
elgalu/selenium:2.47.1g
31+
elgalu/selenium:2.47.1h
3232

3333
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:
3434

@@ -93,7 +93,7 @@ You can launch a grid only container via environment variables:
9393

9494
docker run --rm --name=hub -p 4444:24444 -p 5930:25900 -p 2223:22222 \
9595
-p=6081:26080 -e CHROME=false -e FIREFOX=false \
96-
elgalu/selenium:2.47.1g
96+
elgalu/selenium:2.47.1h
9797

9898
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.
9999

@@ -109,13 +109,17 @@ You can lunch a node only container via environment variables:
109109
-p 25550:25550 -p 25551:25551 \
110110
-e GRID=false -e CHROME=true -e FIREFOX=true \
111111
-v $(pwd)/videos:/videos \
112-
elgalu/selenium:2.47.1g
112+
elgalu/selenium:2.47.1h
113113

114114
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.
115115

116116
## Chrome crashed
117117

118-
If your tests crashes in Chrome you may need to increase shm size:
118+
If your tests crashes in Chrome you may need to increase shm size or simply start your container by sharing `-v /dev/shm:/dev/shm`
119+
120+
docker run ... -v /dev/shm:/dev/shm
121+
122+
Alternatively you can increase it inside the container:
119123

120124
1. start docker in privileged mode: `docker run --privileged`
121125
2. increase shm size from default 64mb to something bigger:
@@ -146,9 +150,9 @@ There are also additional steps you can take to ensure you're using the correct
146150

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

149-
# e.g. full image id for tag 2.47.1g
150-
export IMGID=dfa1cbfe9932e651e32d60b360cecada4dde289163fe0570d5814af24830ab63
151-
if docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1g |grep ${IMGID} &> /dev/null; then
153+
# e.g. full image id for tag 2.47.1h
154+
export IMGID=TBD
155+
if docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1h |grep ${IMGID} &> /dev/null; then
152156
echo "Image ID tested ok"
153157
else
154158
echo "Image ID doesn't match"
@@ -158,8 +162,8 @@ You can simply verify that image id is indeed the correct one.
158162

159163
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:
160164

161-
# e.g. sha256 for tag 2.47.1g
162-
export SHA=50c14f27c7447cb83cff38736dc2f76033198c94cd80f513a3216b41689c73dd
165+
# e.g. sha256 for tag 2.47.1h
166+
export SHA=TBD
163167
docker pull elgalu/selenium@sha256:${SHA}
164168

165169
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.
@@ -184,7 +188,7 @@ Host machine, terminal 2:
184188
docker run --rm --name=ch -p=4444:24444 \
185189
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
186190
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
187-
elgalu/selenium:2.47.1g
191+
elgalu/selenium:2.47.1h
188192

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

@@ -206,7 +210,7 @@ ANYPORT=0
206210
REMOTE_DOCKER_SRV=localhost
207211
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -p=0.0.0.0:${ANYPORT}:24444 \
208212
-p=0.0.0.0:${ANYPORT}:25900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
209-
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1g
213+
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1h
210214
211215
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
212216
# Useful if the docker server is running in the cloud. Establish free local ports
@@ -216,7 +220,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
216220
# it acts as a jump host so my public key is already on that server
217221
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -e SCREEN_HEIGHT=1110 \
218222
-e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" \
219-
elgalu/selenium:2.47.1g
223+
elgalu/selenium:2.47.1h
220224
221225
# -- Common: Wait for the container to start
222226
./host-scripts/wait-docker-selenium.sh ch 7s
@@ -287,7 +291,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
287291
288292
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:
289293
290-
docker pull elgalu/selenium:2.47.1g
294+
docker pull elgalu/selenium:2.47.1h
291295
292296
#### 2. Use this image
293297

READMELeo.md

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

3-
time (docker build -t="elgalu/selenium:2.47.1g" . ;echo $?;beep)
4-
docker run --rm -ti -m 4000M --cpu-quota=0 --name=ch -p=4470:24444 -p=5920:25900 -p=2222:22222 -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" -v $(pwd)/videos:/videos -e DISABLE_ROLLBACK=true -e VIDEO=true -e MEM_JAVA="1024m" elgalu/selenium:2.47.1g
3+
time (docker build -t="elgalu/selenium:2.47.1h" . ;echo $?;beep)
4+
docker run --rm -ti -m 4000M --cpu-quota=0 --name=ch -p=4470:24444 -p=5920:25900 -p=2222:22222 -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" -v $(pwd)/videos:/videos -e DISABLE_ROLLBACK=true -e VIDEO=true -e MEM_JAVA="1024m" elgalu/selenium:2.47.1h
55

66
See logs
77

88
docker exec -ti ch bash -c "ls -lah /var/log/sele/"
99

1010
Testing in ssh [email protected]
1111

12-
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -p=2222:22222 -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" -e VNC_PASSWORD=Hola3 os-registry.stups.zalan.do/tip/selenium:2.47.1g
12+
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -p=2222:22222 -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" -e VNC_PASSWORD=Hola3 os-registry.stups.zalan.do/tip/selenium:2.47.1h
1313

1414
## Transfer used browser source artifacts to keep them in the cloud
1515

@@ -32,18 +32,18 @@ List firefox versions via docker exe
3232

3333
## To update image id and digest
3434

35-
docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1g
35+
docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1h
3636
docker images --digests
3737

3838
## Run with shared dir
3939

4040
docker run --rm --name=ch -p=127.0.0.1:4460:24444 -p=127.0.0.1:5910:25900 \
41-
-v /e2e/uploads:/e2e/uploads elgalu/selenium:2.47.1g
41+
-v /e2e/uploads:/e2e/uploads elgalu/selenium:2.47.1h
4242
docker run --rm --name=ch -p=4460:24444 -p=5910:25900 \
43-
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:2.47.1g
43+
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:2.47.1h
4444

4545

46-
docker run --rm --name=ff -p=127.0.0.1:4461:24444 -p=127.0.0.1:5911:25900 -v /e2e/uploads:/e2e/uploads elgalu/selenium:2.47.1g
46+
docker run --rm --name=ff -p=127.0.0.1:4461:24444 -p=127.0.0.1:5911:25900 -v /e2e/uploads:/e2e/uploads elgalu/selenium:2.47.1h
4747

4848
## Run without shared dir and bind ports to all network interfaces
4949

@@ -66,11 +66,11 @@ List firefox versions via docker exe
6666
## Run without dir and bind to all interfaces
6767
Note anything after the image will be taken as arguments for the cmd/entrypoint
6868

69-
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:24444 -p=0.0.0.0:5920:25900 -e SCREEN_WIDTH=1800 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1g
69+
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:24444 -p=0.0.0.0:5920:25900 -e SCREEN_WIDTH=1800 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1h
7070

71-
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola elgalu/selenium:2.47.1g
72-
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:2.47.1g
73-
docker run --rm --name=ch -p=0.0.0.0:4470:24444 -p=0.0.0.0:5920:25900 --add-host myserver.dev:172.17.42.1 elgalu/selenium:2.47.1g
71+
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola elgalu/selenium:2.47.1h
72+
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:2.47.1h
73+
docker run --rm --name=ch -p=0.0.0.0:4470:24444 -p=0.0.0.0:5920:25900 --add-host myserver.dev:172.17.42.1 elgalu/selenium:2.47.1h
7474

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

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

8080
vncv localhost:5920 -Scaling=60% &
8181

82-
docker run --rm --name=ff -p=0.0.0.0:4471:24444 -p=0.0.0.0:5921:25900 elgalu/selenium:2.47.1g
82+
docker run --rm --name=ff -p=0.0.0.0:4471:24444 -p=0.0.0.0:5921:25900 elgalu/selenium:2.47.1h
8383

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

8787
## Push version
8888

8989
docker login
90-
docker push docker.io/elgalu/selenium:2.47.1g ;echo $?;beep
91-
docker tag elgalu/selenium:2.47.1g elgalu/selenium:latest
90+
docker push docker.io/elgalu/selenium:2.47.1h ;echo $?;beep
91+
docker tag elgalu/selenium:2.47.1h elgalu/selenium:latest
9292
docker push docker.io/elgalu/selenium:latest
9393

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

97-
docker push elgalu/selenium:2.47.1g
98-
docker push elgalu/docker-selenium:2.47.1g
99-
docker push docker.io/elgalu/docker-selenium:2.47.1g
97+
docker push elgalu/selenium:2.47.1h
98+
docker push elgalu/docker-selenium:2.47.1h
99+
docker push docker.io/elgalu/docker-selenium:2.47.1h
100100

101101
## Pulling
102102

103-
docker pull registry.hub.docker.com/elgalu/selenium:2.47.1g
103+
docker pull registry.hub.docker.com/elgalu/selenium:2.47.1h
104104

105105
## Pull
106106

107-
docker run -d --name=max -p=0.0.0.0:4411:24444 -p=0.0.0.0:5911:25900 elgalu/selenium:2.47.1g
107+
docker run -d --name=max -p=0.0.0.0:4411:24444 -p=0.0.0.0:5911:25900 elgalu/selenium:2.47.1h
108108

109109
How to connect through vnc (need a vnc client)
110110

scm-source.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"url": "https://github.com/elgalu/docker-selenium",
3-
"revision": "f57ae28b3f2a0181ca8172d230f8b79205c6b590",
3+
"revision": "4919d929c6a047a76874f4e08ee9014ed3570c11",
44
"author": "lgallucci",
55
"status": ""
66
}

0 commit comments

Comments
 (0)