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
* Missing docker port in REMOTE_HOST example.
Issue #799 was partially caused by a missing port in the docker run
statement
* Added docker-compose example with support for Docker SWARM
* added command to start docker in swarm mode
Copy file name to clipboardExpand all lines: README.md
+44-11Lines changed: 44 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ Images included:
24
24
-__selenium/standalone-chrome-debug__: Selenium Standalone with Chrome installed and runs a VNC server
25
25
-__selenium/standalone-firefox-debug__: Selenium Standalone with Firefox installed and runs a VNC server
26
26
27
-
##
27
+
##
28
28
29
29
## Running the images
30
30
:exclamation: When executing `docker run` for an image with Chrome or Firefox please either mount `-v /dev/shm:/dev/shm` or use the flag `--shm-size=2g` to use the host's shared memory.
@@ -78,7 +78,7 @@ When you are done using the grid and the containers have exited, the network can
78
78
```bash
79
79
# Remove all unused networks
80
80
$ docker network prune
81
-
# OR
81
+
# OR
82
82
# Removes the grid network
83
83
$ docker network rm grid
84
84
```
@@ -146,10 +146,43 @@ services:
146
146
147
147
To stop the grid and cleanup the created containers, run `docker-compose down`.
148
148
149
+
##### Version 3 with Swarm support
150
+
```yaml
151
+
# To start Docker in Swarm mode, you need to run `docker swarm init`
152
+
# To deploy the Grid, `docker stack deploy -c docker-compose.yml grid`
@@ -214,7 +247,7 @@ By default, each image will only allow one slot per container, which is what we
214
247
container resources and variables will be used for that browser, and this helps to have more stable tests.
215
248
216
249
Nevertheless, if you would like to have more slots per node, this can be configured via environment variables with the
217
-
environment variable `NODE_MAX_INSTANCES`. For example, a Firefox node with 5 slots:
250
+
environment variable `NODE_MAX_INSTANCES`. For example, a Firefox node with 5 slots:
218
251
219
252
``` bash
220
253
# Assuming a hub was already started
@@ -303,7 +336,7 @@ A Grid that is ready, composed by a hub and a node, could look like this:
303
336
}
304
337
```
305
338
306
-
The `"ready": true` value indicates that the Grid is ready to receive requests. This status can be polled through a
339
+
The `"ready": true` value indicates that the Grid is ready to receive requests. This status can be polled through a
307
340
script before running any test, or it can be added as a [HEALTHCHECK](https://docs.docker.com/engine/reference/run/#healthcheck)
308
341
when the docker container is started.
309
342
@@ -359,15 +392,15 @@ done
359
392
exec $cmd
360
393
```
361
394
**Note:** If needed, replace `localhost` and `4444` for the correct values in your environment. Also, this script is polling indefinitely, you might want
362
-
to tweak it and establish a timeout.
395
+
to tweak it and establish a timeout.
363
396
364
397
Let's say that the normal command to execute your tests is `mvn clean test`. Here is a way to use the above script and execute your tests:
365
398
366
399
```bash
367
400
$ ./wait-for-grid.sh mvn clean test
368
401
```
369
402
370
-
Like this, the script will poll until the Grid is ready, and then your tests will start.
403
+
Like this, the script will poll until the Grid is ready, and then your tests will start.
0 commit comments