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

Commit 7c63889

Browse files
committed
Upgrade Chrome stable to 45.0.2454.85, --net=host --pid=host
1 parent 578c826 commit 7c63889

File tree

6 files changed

+64
-35
lines changed

6 files changed

+64
-35
lines changed

CHANGELOG.md

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

16+
## 2.47.1i (2015-09-04)
17+
+ Upgrade Chrome stable to 45.0.2454.85 and beta/dev (Leo Gallucci)
18+
+ Document how to share the host dns via --net=host --pid=host
19+
+ Only umount/mount /dev/shm if -e SHM_TRY_MOUNT_UNMOUNT=true
20+
+ Allow to use a network interface different from "eth0" like "em1"
21+
+ Image tag details:
22+
+ Selenium: v2.47.1 (411b314)
23+
+ Chrome stable: 45.0.2454.85
24+
+ Chrome beta: 46.0.2490.13
25+
+ Chrome dev (unstable): 47.0.2498.0
26+
+ Firefox versions in this image:
27+
40.0.3 39.0.3 38.0.6 37.0.2 36.0.4
28+
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
29+
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
30+
+ Chromedriver: 2.19.346067 (6abd8652f8bc7a1d825962003ac88ec6a37a82f1)
31+
+ Java: 1.8.0_66-internal OpenJDK 64-Bit 1.8.0_66-b01
32+
+ Timezone: Europe/Berlin
33+
+ Built with: Docker version 1.8.1, build d12ea79
34+
+ FROM ubuntu:wily-20150807
35+
+ Python: 2.7.10
36+
+ Sauce Connect 4.3.11, build 1757 2b421bb
37+
+ BrowserStack Local version 3.7
38+
+ Image ID: TBD
39+
+ Digest: sha256:TBD
40+
1641
## 2.47.1h (2015-08-28)
1742
+ Upgrade Firefox 40.0.3, Chrome flavors, chromedriver 2.19 (Leo Gallucci)
1843
+ Image tag details:

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
593593
# TODO: Use Google fingerprint to verify downloads
594594
# http://www.google.de/linuxrepositories/
595595
# Also fix .deb file names with correct version
596-
RUN latest_chrome_version_trigger="44.0.2403.157" \
596+
RUN latest_chrome_version_trigger="45.0.2454.85" \
597597
&& mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
598598
&& export CHROME_URL="https://dl.google.com/linux/direct" \
599599
&& wget --no-verbose -O \
@@ -827,7 +827,10 @@ ENV FIREFOX_VERSIONS="${FIREFOX_VERSIONS1}, ${FIREFOX_VERSIONS2}, ${FIREFOX_VERS
827827
# Amount of lines to display when startup errors
828828
TAIL_LOG_LINES="15" \
829829
# Fix small tiny 64mb shm issue
830+
SHM_TRY_MOUNT_UNMOUNT="false" \
830831
SHM_SIZE="512M" \
832+
# When docker run --net=host the network name may be different
833+
ETHERNET_DEVICE_NAME="eth0" \
831834
# Java stuff
832835
# MEM_JAVA="1024m" \
833836
#===============================

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note SeleniumHQ/docker-selenium project is more useful for building selenium gri
2020
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

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

2525
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:
2626

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

8686
docker run --rm --name=hub -p 4444:24444 -p 5930:25900 -p 2223:22222 \
8787
-p=6081:26080 -e CHROME=false -e FIREFOX=false \
88-
elgalu/selenium:2.47.1h
88+
elgalu/selenium:2.47.1i
8989

9090
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.
9191

@@ -101,7 +101,7 @@ You can lunch a node only container via environment variables:
101101
-p 25550:25550 -p 25551:25551 \
102102
-e GRID=false -e CHROME=true -e FIREFOX=true \
103103
-v $(pwd)/videos:/videos \
104-
elgalu/selenium:2.47.1h
104+
elgalu/selenium:2.47.1i
105105

106106
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.
107107

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

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

145-
# e.g. full image id for tag 2.47.1h
146-
export IMGID=4c83c4d2b3261531ae874e873f56a32af7e9836db77d2b8020e7de25b2b21b66
147-
if docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1h |grep ${IMGID} &> /dev/null; then
145+
# e.g. full image id for tag 2.47.1i
146+
export IMGID=TBD
147+
if docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1i |grep ${IMGID} &> /dev/null; then
148148
echo "Image ID tested ok"
149149
else
150150
echo "Image ID doesn't match"
@@ -154,8 +154,8 @@ You can simply verify that image id is indeed the correct one.
154154

155155
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:
156156

157-
# e.g. sha256 for tag 2.47.1h
158-
export SHA=b906385e2e14d2ff642de9c1c01e353fc50e0345d5f04c934586cc0c4951fd03
157+
# e.g. sha256 for tag 2.47.1i
158+
export SHA=TBD
159159
docker pull elgalu/selenium@sha256:${SHA}
160160

161161
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.
@@ -180,7 +180,7 @@ Host machine, terminal 2:
180180
docker run --rm --name=ch -p=4444:24444 \
181181
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
182182
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
183-
elgalu/selenium:2.47.1h
183+
elgalu/selenium:2.47.1i
184184

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

@@ -202,7 +202,7 @@ ANYPORT=0
202202
REMOTE_DOCKER_SRV=localhost
203203
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -p=0.0.0.0:${ANYPORT}:24444 \
204204
-p=0.0.0.0:${ANYPORT}:25900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
205-
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1h
205+
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.47.1i
206206
207207
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
208208
# Useful if the docker server is running in the cloud. Establish free local ports
@@ -212,7 +212,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
212212
# it acts as a jump host so my public key is already on that server
213213
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -e SCREEN_HEIGHT=1110 \
214214
-e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" \
215-
elgalu/selenium:2.47.1h
215+
elgalu/selenium:2.47.1i
216216
217217
# -- Common: Wait for the container to start
218218
./host-scripts/wait-docker-selenium.sh ch 7s
@@ -283,7 +283,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
283283
284284
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:
285285
286-
docker pull elgalu/selenium:2.47.1h
286+
docker pull elgalu/selenium:2.47.1i
287287
288288
#### 2. Use this image
289289

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.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
3+
time (docker build -t="elgalu/selenium:2.47.1i" . ;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.1i
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.1h
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.1i
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.1h
35+
docker inspect -f='{{.Id}}' elgalu/selenium:2.47.1i
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.1h
41+
-v /e2e/uploads:/e2e/uploads elgalu/selenium:2.47.1i
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.1h
43+
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:2.47.1i
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.1h
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.1i
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.1h
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.1i
7070

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
71+
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola elgalu/selenium:2.47.1i
72+
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:2.47.1i
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.1i
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.1h
82+
docker run --rm --name=ff -p=0.0.0.0:4471:24444 -p=0.0.0.0:5921:25900 elgalu/selenium:2.47.1i
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.1h ;echo $?;beep
91-
docker tag elgalu/selenium:2.47.1h elgalu/selenium:latest
90+
docker push docker.io/elgalu/selenium:2.47.1i ;echo $?;beep
91+
docker tag elgalu/selenium:2.47.1i 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.1h
98-
docker push elgalu/docker-selenium:2.47.1h
99-
docker push docker.io/elgalu/docker-selenium:2.47.1h
97+
docker push elgalu/selenium:2.47.1i
98+
docker push elgalu/docker-selenium:2.47.1i
99+
docker push docker.io/elgalu/docker-selenium:2.47.1i
100100

101101
## Pulling
102102

103-
docker pull registry.hub.docker.com/elgalu/selenium:2.47.1h
103+
docker pull registry.hub.docker.com/elgalu/selenium:2.47.1i
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.1h
107+
docker run -d --name=max -p=0.0.0.0:4411:24444 -p=0.0.0.0:5911:25900 elgalu/selenium:2.47.1i
108108

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

bin/entry.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export SCREEN_DEPTH="${SCREEN_MAIN_DEPTH}+${SCREEN_SUB_DEPTH}"
2121
export GEOMETRY="${SCREEN_WIDTH}""x""${SCREEN_HEIGHT}""x""${SCREEN_DEPTH}"
2222
# These values are only available when the container started
2323
export DOCKER_HOST_IP=$(netstat -nr | grep '^0\.0\.0\.0' | awk '{print $2}')
24-
export CONTAINER_IP=$(ip addr show dev eth0 | grep "inet " | awk '{print $2}' | cut -d '/' -f 1)
24+
export CONTAINER_IP=$(ip addr show dev ${ETHERNET_DEVICE_NAME} | grep "inet " | awk '{print $2}' | cut -d '/' -f 1)
2525
export COMMON_CAPS="maxInstances=${MAX_INSTANCES},platform=LINUX,acceptSslCerts=true"
2626
export CHROME_PATH="/usr/bin/google-chrome-${CHROME_FLAVOR}"
2727
export CHROME_VERSION=$(${CHROME_PATH} --version 2>&1 | grep "Google Chrome" | grep -iEo "[0-9.]{2,20}.*")
@@ -70,7 +70,8 @@ echo "-- INFO: Container USER var is: '$USER', \$(whoami) returns '$WHOAMI', UID
7070
# Fix small tiny 64mb shm issue
7171
#-------------------------------
7272
# https://github.com/elgalu/docker-selenium/issues/20
73-
if sudo umount /dev/shm; then
73+
if [ "${SHM_TRY_MOUNT_UNMOUNT}" = "true" ]; then
74+
sudo umount /dev/shm || true
7475
sudo mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=${SHM_SIZE} \
7576
tmpfs /dev/shm || true
7677
fi

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": "3f380fa1ec0ed73524e0ef5092b2c0a7f47e1a9c",
3+
"revision": "578c8260a132673df3de9f33e1761bf681f89bd3",
44
"author": "lgallucci",
55
"status": ""
66
}

0 commit comments

Comments
 (0)