You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 30, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+34-14Lines changed: 34 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,10 @@ Note SeleniumHQ/docker-selenium project is more useful for building selenium gri
22
22
23
23
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.
24
24
25
-
docker pull elgalu/selenium:2.53.0b
25
+
docker pull elgalu/selenium:2.53.0c
26
26
27
-
docker run --rm --name=grid -p 4444:24444 -p 5920:25900 \
Make sure `docker run` finishes via active wait with below command. This is **mandatory** before start running your tests! Note `grid` is the name of the container:
31
31
@@ -70,12 +70,12 @@ Supervisor exposes an http server but is not enough to bind the ports via `docke
70
70
### Screen size
71
71
You can set a custom screen size at docker run time by providing `SCREEN_WIDTH` and `SCREEN_HEIGHT` environment variables:
72
72
73
-
docker pull elgalu/selenium:2.53.0b
73
+
docker pull elgalu/selenium:2.53.0c
74
74
75
75
docker run -d --name=grid -p 4444:24444 -p 5920:25900 \
76
76
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \
77
77
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1480 \
78
-
elgalu/selenium:2.53.0b
78
+
elgalu/selenium:2.53.0c
79
79
80
80
docker exec grid wait_all_done 10s
81
81
@@ -112,13 +112,30 @@ It is important to note that `ffmpeg` video recording takes an important amount
112
112
113
113
When you don't specify a VNC password a random one will be generated. That password can be seeing by grepping the logs:
114
114
115
-
docker exec grid grep "was generated for you:" /var/log/cont/vnc-stdout.log
116
-
#=> a VNC password was generated for you: ooGhai0aesaesh
115
+
docker exec grid wait_all_done 30s
116
+
#=> ... a VNC password was generated for you: ooGhai0aesaesh
117
117
118
118
You can connect to see what's happening
119
119
120
120
open vnc://:ooGhai0aesaesh@localhost:5920
121
121
122
+
### noVNC
123
+
124
+
Disabled by default, [noVNC](https://github.com/kanaka/noVNC) provides a browser VNC client so you don't need to install a vnc viewer if you choose so. Note we were using guacamole before.
125
+
126
+
Safari Browser already comes with a built-in vnc viewer so this feature is overkill and is disabled by default, just navigate to vnc://localhost:5920 in your Safari browser.
127
+
128
+
You need to pass the environment variable `-e NOVNC=true` in order to start the noVNC service and will be able to open a browser at [localhost:6080](http://localhost:6080/vnc.html)
129
+
130
+
docker run --rm -ti --name=grid -p 4444:24444 -p 5920:25900 \
If the VNC password was randomly generated find out with
135
+
136
+
docker exec grid wait_all_done 30s
137
+
#=> ... a VNC password was generated for you: ooGhai0aesaesh
138
+
122
139
## Chrome crashed
123
140
124
141
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`
@@ -179,9 +196,9 @@ There are also additional steps you can take to ensure you're using the correct
179
196
180
197
You can simply verify that image id is indeed the correct one.
181
198
182
-
# e.g. full image id for tag 2.53.0b
199
+
# e.g. full image id for tag 2.53.0c
183
200
export IMGID="<<Please see CHANGELOG.md>>"
184
-
if docker inspect -f='{{.Id}}' elgalu/selenium:2.53.0b |grep ${IMGID} &> /dev/null; then
201
+
if docker inspect -f='{{.Id}}' elgalu/selenium:2.53.0c |grep ${IMGID} &> /dev/null; then
185
202
echo "Image ID tested ok"
186
203
else
187
204
echo "Image ID doesn't match"
@@ -191,7 +208,7 @@ You can simply verify that image id is indeed the correct one.
191
208
192
209
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:
@@ -320,7 +338,7 @@ If you git clone this repo locally, i.e. cd into where the Dockerfile is, you ca
320
338
321
339
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:
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.
345
345
@@ -353,7 +353,7 @@ You can lunch a node only container via environment variables:
353
353
-e SELENIUM_HUB_PORT=4444 \
354
354
-e SELENIUM_NODE_HOST=docker.host \
355
355
-e GRID=false -e CHROME=true -e FIREFOX=true \
356
-
elgalu/selenium:2.53.0b
356
+
elgalu/selenium:2.53.0c
357
357
358
358
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.
359
359
@@ -367,7 +367,7 @@ Start the grid with Chrome and Firefox
Disabled by default, [noVNC](https://github.com/kanaka/noVNC) provides a browser VNC client so you don't need to install a vnc viewer if you choose so. Note we were using guacamole before.
395
-
396
-
Safari Browser already comes with a built-in vnc viewer so this feature is overkill and is disabled by default, just navigate to vnc://localhost:5920 in your Safari browser.
397
-
398
-
You need to pass the environment variable `-e NOVNC=true` in order to start the noVNC service and will be able to open a browser at [localhost:6080](http://localhost:6080/vnc.html)
399
-
400
-
docker run --rm --name=grid -p 4444:24444 -p 5920:25900 \
401
-
-p 6080:26080 -e NOVNC=true \
402
-
elgalu/selenium:2.53.0b
403
-
404
-
If the VNC password was randomly generated find out with
405
-
406
-
docker exec grid grep "was generated for you:" /var/log/cont/vnc-stdout.log
407
-
#=> a VNC password was generated for you: ooGhai0aesaesh
0 commit comments