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.
2. Wait until the grid starts properly before starting the tests _(Optional but recommended)_
78
78
@@ -105,15 +105,15 @@ Please google those errors first before opening an issue in this project.
105
105
# capabilities['marionette'] = False
106
106
docker run --rm -ti --name=grid2 -p 4444:24444 -p 5900:25900 \
107
107
-e USE_SELENIUM=2 \
108
-
-v /dev/shm:/dev/shm elgalu/selenium
108
+
--shm-size=1g elgalu/selenium
109
109
```
110
110
111
111
### e.g. Selenium 3 with FF 49.0.1
112
112
```sh
113
113
# capabilities['marionette'] = True
114
114
docker run --rm -ti --name=grid3 -p 4444:24444 -p 5900:25900 \
115
115
-e USE_SELENIUM=3 \
116
-
-v /dev/shm:/dev/shm elgalu/selenium
116
+
--shm-size=1g elgalu/selenium
117
117
```
118
118
119
119
### Docker Compose
@@ -133,7 +133,7 @@ This image is designed to run one test on each docker container but if you still
133
133
1. The _(not recommended)_ way is by increasing `MAX_INSTANCES` and `MAX_SESSIONS` which now [defaults](https://github.com/elgalu/docker-selenium/blob/2.53.1a/Dockerfile#L967) to 1.
134
134
135
135
docker run -d --name=grid -p 4444:24444 -p 5900:25900 \
136
-
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \
136
+
--shm-size=1g -e VNC_PASSWORD=hola \
137
137
-e MAX_INSTANCES=20 -e MAX_SESSIONS=20 \
138
138
elgalu/selenium
139
139
@@ -157,7 +157,7 @@ You can also ssh into the machine as long as `SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa
157
157
docker run --rm -ti --name=grid -p=4444:24444 -p=5900:25900 -p=22222:22222 \
158
158
-e SSHD=true \
159
159
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" \
160
-
-v /dev/shm:/dev/shm elgalu/selenium
160
+
--shm-size=1g elgalu/selenium
161
161
162
162
Then
163
163
@@ -168,7 +168,7 @@ Include `-X` in ssh command if you want to redirect the started GUI programs to
168
168
docker run --rm -ti --name=grid -p=4444:24444 -p=5900:25900 -p=22222:22222 \
169
169
-e SSHD=true -e SSHD_X11FORWARDING=yes \
170
170
-e SSH_AUTH_KEYS="$(cat ~/.ssh/id_rsa.pub)" \
171
-
-v /dev/shm:/dev/shm elgalu/selenium
171
+
--shm-size=1g elgalu/selenium
172
172
173
173
Then
174
174
@@ -189,7 +189,7 @@ You can set a custom screen size at docker run time by providing `SCREEN_WIDTH`
189
189
docker pull elgalu/selenium
190
190
191
191
docker run -d --name=grid -p 4444:24444 -p 5900:25900 \
192
-
-v /dev/shm:/dev/shm -e VNC_PASSWORD=hola \
192
+
--shm-size=1g -e VNC_PASSWORD=hola \
193
193
-e SCREEN_WIDTH=1920 -e SCREEN_HEIGHT=1480 \
194
194
elgalu/selenium
195
195
@@ -202,7 +202,7 @@ You can control and modify the timezone on a container by using the [TZ](https:/
202
202
203
203
docker run --rm -ti --name=grid -p 4444:24444 -p 5900:25900 \
204
204
-e TZ="US/Pacific" -e VNC_PASSWORD=hola \
205
-
-v /dev/shm:/dev/shm elgalu/selenium
205
+
--shm-size=1g elgalu/selenium
206
206
207
207
Examples:
208
208
@@ -269,7 +269,7 @@ Safari Browser already comes with a built-in vnc viewer so this feature is overk
269
269
You need to pass the environment variable `-e NOVNC=true` in order to start the noVNC service and you will be able to open a browser at [localhost:6080](http://localhost:6080/vnc.html)
270
270
271
271
docker run --rm -ti --name=grid -p 4444:24444 -p 5900:25900 \
If the VNC password was randomly generated find out with
@@ -283,7 +283,7 @@ If the VNC password was randomly generated find out with
283
283
284
284
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` or, alternatively, `--shm-size=1g`
285
285
286
-
docker run ... -v /dev/shm:/dev/shm
286
+
docker run ... --shm-size=1g
287
287
288
288
Alternatively you can increase it inside the container:
@@ -468,14 +468,14 @@ So `--pid=host` is included to avoid https://github.com/docker/docker/issues/589
468
468
Full example using `--net=host` and `--pid=host` but for this to work in OSX you need the latest docker mac package, upgrade if you haven't done so in the last month.
469
469
470
470
docker run -d --name=grid --net=host --pid=host \
471
-
-v /dev/shm:/dev/shm -e SELENIUM_HUB_PORT=4444 \
471
+
--shm-size=1g -e SELENIUM_HUB_PORT=4444 \
472
472
elgalu/selenium
473
473
docker exec grid wait_all_done 30s
474
474
./test/python_test.py
475
475
476
476
#### DNS example
477
477
478
-
docker run -d --net=host --pid=host --name=grid -v /dev/shm:/dev/shm elgalu/selenium
478
+
docker run -d --net=host --pid=host --name=grid --shm-size=1g elgalu/selenium
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.
@@ -149,5 +149,5 @@ Port numbers are completely arbitrary, VNC port will be `5940` and Selenium node
0 commit comments