Skip to content

Commit aae1601

Browse files
MacCrackendiemol
authored andcommitted
Update README.md (#724)
* Update README.md just incase users are using docker-compose version 3; delineated between version 2 and 3 * Update README.md I've updated to comments to read for yaml, changing variables HUB_HOST and HUB_PORT haven't been tested by me on my side. I can confirm these settings work. * Update README.md updated the variables - had to test they didn't break the dockers
1 parent 20995d2 commit aae1601

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ $ docker network rm grid
8787
The most simple way to start a grid is with [docker-compose](https://docs.docker.com/compose/overview/), use the following
8888
snippet as your `docker-compose.yaml`, save it locally and in the same folder run `docker-compose up`.
8989

90+
##### Version 2
9091
```yaml
9192
# To execute this docker-compose yml file use docker-compose -f <file_name> up
9293
# Add the "-d" flag at the end for deattached execution
@@ -114,7 +115,34 @@ services:
114115
image: selenium/hub:3.11.0-californium
115116
ports:
116117
- "4444:4444"
117-
```
118+
```
119+
120+
##### Version 3
121+
```yaml
122+
# To execute this docker-compose yml file use docker-compose -f <file_name> up
123+
# Add the "-d" flag at the end for deattached execution
124+
version: "3"
125+
services:
126+
selenium-hub:
127+
image: selenium/hub:3.11.0-californium
128+
container_name: selenium-hub
129+
ports:
130+
- "4444:4444"
131+
chrome:
132+
image: selenium/node-chrome:3.11.0-californium
133+
depends_on:
134+
- selenium-hub
135+
environment:
136+
- HUB_HOST=selenium-hub
137+
- HUB_PORT=4444
138+
firefox:
139+
image: selenium/node-firefox:3.11.0-californium
140+
depends_on:
141+
- selenium-hub
142+
environment:
143+
- HUB_HOST=selenium-hub
144+
- HUB_PORT=4444
145+
```
118146
119147
To stop the grid and cleanup the created containers, run `docker-compose down`.
120148

0 commit comments

Comments
 (0)