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

Commit 57319d2

Browse files
committed
Add +extension GLX to Xvfb in preparation for android emulators
1 parent 49bf4fb commit 57319d2

File tree

7 files changed

+75
-52
lines changed

7 files changed

+75
-52
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
tmp/
22
*_image/
3-
browsers-bins/
3+
binaries/
44
READMEBS.md
55
videos/
66

CHANGELOG.md

Lines changed: 37 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,36 @@ 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+
## 2.46.0-06 (2015-07-24)
8+
+ Upgrade chrome stable to 44.0.2403.89. (Leo Gallucci)
9+
+ Remove letter v from version tags due to github tarball issue.
10+
+ Add +extension GLX to Xvfb in preparation for android emulators.
11+
+ Image tag details:
12+
+ Selenium: v2.46.0 (87c69e2)
13+
+ Chrome stable: 44.0.2403.89
14+
+ Chrome beta: 44.0.2403.89
15+
+ Chrome dev: 45.0.2454.7
16+
+ Firefox versions in this image:
17+
39.0 38.0.6 37.0.2 36.0.4
18+
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
19+
29.0.1 28.0 27.0.1 26.0 25.0.1 24.0
20+
+ chromedriver: 2.16.333243 (0bfa1d3575fc1044244f21ddb82bf870944ef961)
21+
+ Java: 1.8.0_60-internal OpenJDK 64-Bit 1.8.0_60-b22
22+
+ Timezone: Europe/Berlin
23+
+ Built with: Docker version 1.7.1, build 786b29d
24+
+ FROM ubuntu:wily-20150708
25+
+ Python: 2.7.10
26+
+ Image ID: TBD
27+
+ Digest: sha256:TBD
28+
729
## v2.46.0-05 (2015-07-20)
830
+ Split video files through `-e VIDEO_CHUNK_SECS="00:10:00"`. (Leo Gallucci)
931
+ Lower down ffmpeg CPU usage considerable by using libx264 ultrafast.
1032
+ Image tag details:
1133
+ Selenium: v2.46.0 (87c69e2)
12-
+ Chrome stable: 43.0.2357.134
13-
+ Chrome beta: 44.0.2403.89
14-
+ Chrome unstable: 45.0.2454.7
34+
+ Chrome stable: 43.0.2357.134
35+
+ Chrome beta: 44.0.2403.89
36+
+ Chrome dev: 45.0.2454.7
1537
+ Firefox versions in this image:
1638
39.0 38.0.6 37.0.2 36.0.4
1739
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
@@ -33,9 +55,9 @@ Note image ids also change after scm-source.json has being updated which trigger
3355
+ Fix bug while docker stop $NAME; supervisor not getting SIGINT properly.
3456
+ Image tag details:
3557
+ Selenium: v2.46.0 (87c69e2)
36-
+ Chrome stable: 43.0.2357.134
37-
+ Chrome beta: 44.0.2403.89
38-
+ Chrome unstable: 45.0.2454.7
58+
+ Chrome stable: 43.0.2357.134
59+
+ Chrome beta: 44.0.2403.89
60+
+ Chrome dev: 45.0.2454.7
3961
+ Firefox versions in this image:
4062
39.0 38.0.6 37.0.2 36.0.4
4163
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
@@ -55,9 +77,9 @@ Note image ids also change after scm-source.json has being updated which trigger
5577
+ Improve log output when container startup fails.
5678
+ Image tag details:
5779
+ Selenium: v2.46.0 (87c69e2)
58-
+ Chrome stable: 43.0.2357.134
59-
+ Chrome beta: 44.0.2403.81
60-
+ Chrome unstable: 45.0.2454.6
80+
+ Chrome stable: 43.0.2357.134
81+
+ Chrome beta: 44.0.2403.81
82+
+ Chrome dev: 45.0.2454.6
6183
+ Firefox versions in this image:
6284
39.0 38.0.6 37.0.2 36.0.4
6385
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
@@ -76,9 +98,9 @@ Note image ids also change after scm-source.json has being updated which trigger
7698
+ Start services via env vars VIDEO=false GRID=true CHROME=true FIREFOX=true
7799
+ Image tag details:
78100
+ Selenium: v2.46.0 (87c69e2)
79-
+ Chrome stable: 43.0.2357.134
80-
+ Chrome beta: 44.0.2403.81
81-
+ Chrome unstable: 45.0.2454.6
101+
+ Chrome stable: 43.0.2357.134
102+
+ Chrome beta: 44.0.2403.81
103+
+ Chrome dev: 45.0.2454.6
82104
+ Firefox versions in this image:
83105
39.0 38.0.6 37.0.2 36.0.4
84106
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0
@@ -101,9 +123,9 @@ Note image ids also change after scm-source.json has being updated which trigger
101123
+ Record videos via `-e VIDEO=true` or start-video/stop-video scripts.
102124
+ Image tag details:
103125
+ Selenium: v2.46.0 (87c69e2)
104-
+ Chrome stable: 43.0.2357.134
105-
+ Chrome beta: 44.0.2403.81
106-
+ Chrome unstable: 45.0.2454.6
126+
+ Chrome stable: 43.0.2357.134
127+
+ Chrome beta: 44.0.2403.81
128+
+ Chrome dev: 45.0.2454.6
107129
+ Firefox versions in this image:
108130
39.0 38.0.6 37.0.2 36.0.4
109131
35.0.1 34.0.5 33.0.3 32.0.3 31.0 30.0

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,8 @@ RUN apt-get update -qqy \
519519
# TODO: Use Google fingerprint to verify downloads
520520
# http://www.google.de/linuxrepositories/
521521
# Also fix .deb file names with correct version
522-
RUN mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
522+
RUN latest_chrome_version_trigger="44.0.2403.89" \
523+
&& mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
523524
&& export CHROME_URL="https://dl.google.com/linux/direct" \
524525
&& wget --no-verbose -O \
525526
${NORMAL_USER_HOME}/chrome-deb/google-chrome-stable_current_amd64.deb \

README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Note SeleniumHQ/docker-selenium project is more useful for building selenium gri
1919
In general: add `sudo` only if needed in your environment and `--privileged` if you really need it.
2020

2121
sudo docker run --privileged -p 4444:24444 -p 5920:25900 \
22-
-e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-05
22+
-e VNC_PASSWORD=hola elgalu/selenium:2.46.0-06
2323

2424
### Non-privileged
2525
### Run
@@ -31,7 +31,7 @@ If your setup is correct, privileged mode and sudo should not be necessary:
3131
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1080 \
3232
-e VNC_PASSWORD=hola \
3333
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" \
34-
elgalu/selenium:v2.46.0-05
34+
elgalu/selenium:2.46.0-06
3535

3636
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:
3737

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

9797
docker run --rm --name=hub -p 4444:24444 -p 5930:25900 -p 2223:22222 \
9898
-p=6081:26080 -e CHROME=false -e FIREFOX=false \
99-
elgalu/selenium:v2.46.0-05
99+
elgalu/selenium:2.46.0-06
100100

101101
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.
102102

@@ -112,7 +112,7 @@ You can lunch a node only container via environment variables:
112112
-p 25550:25550 -p 25551:25551 \
113113
-e GRID=false -e CHROME=true -e FIREFOX=true \
114114
-v $(pwd)/videos:/videos \
115-
elgalu/selenium:v2.46.0-05
115+
elgalu/selenium:2.46.0-06
116116

117117
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.
118118

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

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

140-
# e.g. full image id for tag v2.46.0-05
141-
export IMGID=7c279c889b6c2007b292070324a9109bf3a12b299721af948cf806cac9d62cd7
142-
if docker inspect -f='{{.Id}}' elgalu/selenium:v2.46.0-05 |grep ${IMGID} &> /dev/null; then
140+
# e.g. full image id for tag 2.46.0-06
141+
export IMGID=TBD
142+
if docker inspect -f='{{.Id}}' elgalu/selenium:2.46.0-06 |grep ${IMGID} &> /dev/null; then
143143
echo "Image ID tested ok"
144144
else
145145
echo "Image ID doesn't match"
@@ -149,8 +149,8 @@ You can simply verify that image id is indeed the correct one.
149149

150150
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:
151151

152-
# e.g. sha256 for tag v2.46.0-05
153-
export SHA=9de7c1db421c4b813bca60d148495ed155595b8ee6371f8f600d51a1e42b5782
152+
# e.g. sha256 for tag 2.46.0-06
153+
export SHA=TBD
154154
docker pull elgalu/selenium@sha256:${SHA}
155155

156156
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.
@@ -169,7 +169,7 @@ Host machine, terminal 2:
169169
docker run --rm --name=ch -p=4470:24444 \
170170
-e SCREEN_WIDTH -e SCREEN_HEIGHT -e XE_DISP_NUM \
171171
-v /tmp/.X11-unix/X${XE_DISP_NUM}:/tmp/.X11-unix/X${XE_DISP_NUM} \
172-
elgalu/selenium:v2.46.0-05
172+
elgalu/selenium:2.46.0-06
173173

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

@@ -191,7 +191,7 @@ ANYPORT=0
191191
REMOTE_DOCKER_SRV=localhost
192192
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -p=0.0.0.0:${ANYPORT}:24444 \
193193
-p=0.0.0.0:${ANYPORT}:25900 -e SCREEN_HEIGHT=1110 -e VNC_PASSWORD=hola \
194-
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:v2.46.0-05
194+
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" elgalu/selenium:2.46.0-06
195195
196196
# -- Option 2.docker run- Running docker on remote docker server like in the cloud
197197
# Useful if the docker server is running in the cloud. Establish free local ports
@@ -201,7 +201,7 @@ ssh ${REMOTE_DOCKER_SRV} #get into the remote docker provider somehow
201201
# it acts as a jump host so my public key is already on that server
202202
CONTAINER=$(docker run -d -p=0.0.0.0:${ANYPORT}:22222 -e SCREEN_HEIGHT=1110 \
203203
-e VNC_PASSWORD=hola -e SSH_AUTH_KEYS="$(cat ~/.ssh/authorized_keys)" \
204-
elgalu/selenium:v2.46.0-05
204+
elgalu/selenium:2.46.0-06
205205
206206
# -- Common: Wait for the container to start
207207
./host-scripts/wait-docker-selenium.sh ch 7s
@@ -272,7 +272,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
272272
273273
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:
274274
275-
docker pull elgalu/selenium:v2.46.0-05
275+
docker pull elgalu/selenium:2.46.0-06
276276
277277
#### 2. Use this image
278278

READMELeo.md

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

3-
time (docker build -t="elgalu/selenium:v2.46.0-05" . ;echo $?;beep)
4-
docker run --rm -ti --name=ch -p=4470:24444 -p=5920:25900 -p=2222:22222 -p=6080:26080 -p=29001:29001 -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" -v $(pwd)/videos:/videos -e DISABLE_ROLLBACK=true -e CHROME_FLAVOR=unstable -e FIREFOX_VERSION=38.0.6 -e VIDEO=true -e VIDEO_FILE_NAME=hola -e VIDEO_CHUNK_SECS="00:00:05" elgalu/selenium:v2.46.0-05
3+
time (docker build -t="elgalu/selenium:2.46.0-06" . ;echo $?;beep)
4+
docker run --rm -ti --name=ch -p=4470:24444 -p=5920:25900 -p=2222:22222 -p=6080:26080 -p=29001:29001 -e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" -v $(pwd)/videos:/videos -e DISABLE_ROLLBACK=true -e CHROME_FLAVOR=unstable -e FIREFOX_VERSION=38.0.6 -e VIDEO=true -e VIDEO_FILE_NAME=hola -e VIDEO_CHUNK_SECS="00:00:05" elgalu/selenium:2.46.0-06
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:v2.46.0-05
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.46.0-06
1313

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

1616
SSHCMD="-o StrictHostKeyChecking=no -q -P 2222 application@localhost"
17-
scp ${SSHCMD}:/home/application/chrome-deb/google*.deb browsers-bins/
17+
scp ${SSHCMD}:/home/application/chrome-deb/google*.deb binaries/
1818

1919
List chrome versions via docker exec
2020

@@ -31,18 +31,18 @@ List firefox versions via docker exe
3131

3232
## To update image id and digest
3333

34-
docker inspect -f='{{.Id}}' elgalu/selenium:v2.46.0-05
34+
docker inspect -f='{{.Id}}' elgalu/selenium:2.46.0-06
3535
docker images --digests
3636

3737
## Run with shared dir
3838

3939
docker run --rm --name=ch -p=127.0.0.1:4460:24444 -p=127.0.0.1:5910:25900 \
40-
-v /e2e/uploads:/e2e/uploads elgalu/selenium:v2.46.0-05
40+
-v /e2e/uploads:/e2e/uploads elgalu/selenium:2.46.0-06
4141
docker run --rm --name=ch -p=4460:24444 -p=5910:25900 \
42-
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:v2.46.0-05
42+
-v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):$(which docker) elgalu/selenium:2.46.0-06
4343

4444

45-
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:v2.46.0-05
45+
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.46.0-06
4646

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

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

68-
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:v2.46.0-05
68+
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.46.0-06
6969

70-
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola elgalu/selenium:v2.46.0-05
71-
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:v2.46.0-05
72-
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:v2.46.0-05
70+
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola elgalu/selenium:2.46.0-06
71+
docker run --rm --name=ch -p=4470:24444 -p=5920:25900 -e VNC_PASSWORD=hola docker.io/elgalu/selenium:2.46.0-06
72+
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.46.0-06
7373

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

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

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

81-
docker run --rm --name=ff -p=0.0.0.0:4471:24444 -p=0.0.0.0:5921:25900 elgalu/selenium:v2.46.0-05
81+
docker run --rm --name=ff -p=0.0.0.0:4471:24444 -p=0.0.0.0:5921:25900 elgalu/selenium:2.46.0-06
8282

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

8686
## Push version
8787

8888
docker login
89-
docker push docker.io/elgalu/selenium:v2.46.0-05 ;echo $?;beep
90-
docker tag elgalu/selenium:v2.46.0-05 elgalu/selenium:latest
89+
docker push docker.io/elgalu/selenium:2.46.0-06 ;echo $?;beep
90+
docker tag elgalu/selenium:2.46.0-06 elgalu/selenium:latest
9191
docker push docker.io/elgalu/selenium:latest
9292

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

96-
docker push elgalu/selenium:v2.46.0-05
97-
docker push elgalu/docker-selenium:v2.46.0-05
98-
docker push docker.io/elgalu/docker-selenium:v2.46.0-05
96+
docker push elgalu/selenium:2.46.0-06
97+
docker push elgalu/docker-selenium:2.46.0-06
98+
docker push docker.io/elgalu/docker-selenium:2.46.0-06
9999

100100
## Pulling
101101

102-
docker pull registry.hub.docker.com/elgalu/selenium:v2.46.0-05
102+
docker pull registry.hub.docker.com/elgalu/selenium:2.46.0-06
103103

104104
## Pull
105105

106-
docker run -d --name=max -p=0.0.0.0:4411:24444 -p=0.0.0.0:5911:25900 elgalu/selenium:v2.46.0-05
106+
docker run -d --name=max -p=0.0.0.0:4411:24444 -p=0.0.0.0:5911:25900 elgalu/selenium:2.46.0-06
107107

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

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": "df99dfb1838b6a49452217d052d0dc9f747874a7",
3+
"revision": "49bf4fbd720cf1e2444629b58f17f12f68d38a66",
44
"author": "lgallucci",
55
"status": ""
66
}

xvfb/bin/start-xvfb.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ else
1616
# using Xvfb instead of Xdummy
1717
echo "Will start Xvfb with DISPLAY=${DISPLAY} screen=${SCREEN_NUM} geometry=${GEOMETRY}"
1818
Xvfb ${DISPLAY} -screen ${SCREEN_NUM} ${GEOMETRY} -ac -r -cc 4 -accessx \
19-
-xinerama +extension Composite -extension RANDR
19+
-xinerama +extension Composite -extension RANDR +extension GLX
2020
fi
2121

2222
# Note to double pipe output and keep this process logs add at the end:

0 commit comments

Comments
 (0)