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
-__selenium/base__: Base image which includes Java runtime and Selenium Server JAR file
@@ -18,41 +18,38 @@ Images included:
18
18
-__selenium/node-chrome__: Grid Node with Chrome installed, needs to be connected to a Grid Hub
19
19
-__selenium/node-firefox__: Grid Node with Firefox installed, needs to be connected to a Grid Hub
20
20
-__selenium/node-opera__: Grid Node with Opera installed, needs to be connected to a Grid Hub
21
-
-__selenium/node-chrome-debug__: Grid Node with Chrome installed and runs a VNC server, needs to be connected to a Grid Hub
22
-
-__selenium/node-firefox-debug__: Grid Node with Firefox installed and runs a VNC server, needs to be connected to a Grid Hub
23
-
-__selenium/node-opera-debug__: Grid Node with Opera installed and runs a VNC server, needs to be connected to a Grid Hub
24
21
-__selenium/standalone-chrome__: Selenium Standalone with Chrome installed
25
22
-__selenium/standalone-firefox__: Selenium Standalone with Firefox installed
26
23
-__selenium/standalone-opera__: Selenium Standalone with Opera installed
27
-
-__selenium/standalone-chrome-debug__: Selenium Standalone with Chrome installed and runs a VNC server
28
-
-__selenium/standalone-firefox-debug__: Selenium Standalone with Firefox installed and runs a VNC server
29
-
-__selenium/standalone-opera-debug__: Selenium Standalone with Opera installed and runs a VNC server
30
24
31
25
##
32
26
33
27
## Running the images
34
-
: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.
28
+
:exclamation: When executing `docker run` for an image that contains a browser please either mount `-v /dev/shm:/dev/shm` or use the
29
+
flag `--shm-size=2g` to use the host's shared memory.
35
30
36
-
:exclamation: In general, use a tag with an element suffix to pin a specific browser version. See [Tagging Conventions](https://github.com/SeleniumHQ/docker-selenium/wiki/Tagging-Convention) for details.
31
+
:exclamation: Always use a tag with an element suffix to pin a specific browser version.
32
+
See [Tagging Conventions](https://github.com/SeleniumHQ/docker-selenium/wiki/Tagging-Convention) for details.
37
33
38
34
Chrome
39
35
```bash
40
36
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-chrome:3.141.59-zirconium
41
-
#OR
37
+
#OR
42
38
$ docker run -d -p 4444:4444 --shm-size=2g selenium/standalone-chrome:3.141.59-zirconium
43
39
```
44
40
Firefox
45
41
```bash
46
42
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-firefox:3.141.59-zirconium
47
-
#OR
43
+
#OR
48
44
$ docker run -d -p 4444:4444 --shm-size 2g selenium/standalone-firefox:3.141.59-zirconium
49
45
```
50
46
Opera
51
47
```bash
52
48
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-opera:3.141.59-zirconium
53
-
#OR
49
+
#OR
54
50
$ docker run -d -p 4444:4444 --shm-size=2g selenium/standalone-opera:3.141.59-zirconium
55
51
```
52
+
56
53
This is a known workaround to avoid the browser crashing inside a docker container, here are the documented issues for
57
54
[Chrome](https://code.google.com/p/chromium/issues/detail?id=519952) and [Firefox](https://bugzilla.mozilla.org/show_bug.cgi?id=1338771#c10).
58
55
The shm size of 2gb is arbitrary but known to work well, your specific use case might need a different value, it is recommended
$ docker run -d -p 4444:4444 -v /dev/shm:/dev/shm selenium/standalone-opera:3.141.59-zirconium
70
67
```
71
68
72
-
_Note: Only one standalone image can run on port_`4444`_at a time._
69
+
_Note: Only one Standalone container can run on port_`4444`_at a time._
73
70
74
-
To inspect visually what the browser is doing use the `standalone-chrome-debug`, `standalone-firefox-debug` or `standalone-opera-debug` images. See[Debugging](#debugging) section for details.
71
+
To inspect visually what the browser is doing, see the[Debugging](#debugging) section for details.
75
72
76
73
### Selenium Grid Hub and Nodes
77
74
There are different ways to run the images and create a grid, check the following options.
@@ -113,7 +110,7 @@ services:
113
110
volumes:
114
111
- /dev/shm:/dev/shm
115
112
depends_on:
116
-
- hub
113
+
- selenium-hub
117
114
environment:
118
115
HUB_HOST: hub
119
116
@@ -122,7 +119,7 @@ services:
122
119
volumes:
123
120
- /dev/shm:/dev/shm
124
121
depends_on:
125
-
- hub
122
+
- selenium-hub
126
123
environment:
127
124
HUB_HOST: hub
128
125
@@ -131,11 +128,11 @@ services:
131
128
volumes:
132
129
- /dev/shm:/dev/shm
133
130
depends_on:
134
-
- hub
131
+
- selenium-hub
135
132
environment:
136
133
HUB_HOST: hub
137
134
138
-
hub:
135
+
selenium-hub:
139
136
image: selenium/hub:3.141.59-zirconium
140
137
ports:
141
138
- "4444:4444"
@@ -161,7 +158,6 @@ services:
161
158
- selenium-hub
162
159
environment:
163
160
- HUB_HOST=selenium-hub
164
-
- HUB_PORT=4444
165
161
166
162
firefox:
167
163
image: selenium/node-firefox:3.141.59-zirconium
@@ -171,7 +167,6 @@ services:
171
167
- selenium-hub
172
168
environment:
173
169
- HUB_HOST=selenium-hub
174
-
- HUB_PORT=4444
175
170
176
171
opera:
177
172
image: selenium/node-opera:3.141.59-zirconium
@@ -181,7 +176,6 @@ services:
181
176
- selenium-hub
182
177
environment:
183
178
- HUB_HOST=selenium-hub
184
-
- HUB_PORT=4444
185
179
```
186
180
187
181
To stop the grid and cleanup the created containers, run `docker-compose down`.
@@ -195,7 +189,7 @@ To stop the grid and cleanup the created containers, run `docker-compose down`.
0 commit comments