Selenium Grid with Docker containers on different hosts Selenium Grid with Docker containers on different hosts docker docker

Selenium Grid with Docker containers on different hosts


After some more research, I've found out that no extra ambassador container is necessary. The node and hub can communicate directly after setting the appropriate parameters / environment variables REMOTE_HOST, HUB_PORT_4444_TCP_ADDR, HUB_PORT_4444_TCP_PORT. There is also a respective resolved issue https://github.com/SeleniumHQ/docker-selenium/issues/51

To put it in a nutshell, just execute the following commands:

Hub

$ docker run -d -p 4444:4444 --name selenium-hub selenium/hub:2.47.1

Node

$ docker run -d -p 5555:5555 -e REMOTE_HOST="http://<PASTE-NODE-IP>:5555" -e HUB_PORT_4444_TCP_ADDR="<PASTE-HUB-IP>" -e HUB_PORT_4444_TCP_PORT="4444" --name chrome-node selenium/node-chrome:2.47.1