Using selenium hub to organize other nodes
version: '2'
services:
e2e:
image: casperlai/docker-webdriverio:latest
depends_on:
- chrome
- firefox
hub:
image: selenium/hub
ports:
- 4444:4444
container_name: hub
firefox:
image: selenium/node-firefox
ports:
- 5900:5900 # if you want to debug
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
depends_on:
- hub
chrome:
image: selenium/node-chrome
ports:
- 5901:5900 # if you want to debug
environment:
- HUB_PORT_4444_TCP_ADDR=hub
- HUB_PORT_4444_TCP_PORT=4444
depends_on:
- hub
# Add another service
exports.config = {
host: 'YOUR-DOCKER-MACHINE-IP',
port: 4444,
...
}
docker-compose up