I can start a selenium hub image via:
docker run --rm=true -P -p 4444:4444 --name selenium-hub selenium/hub
and add a firefox worker via:
docker run --rm=true --link selenium-hub:hub selenium/node-firefox
Going on http://localhost:4444/grid/console then will show the grid just fine.
I don't want to use docker each time but have the same setup via docker-compose
.
Hence, I thought I could just do this in my docker-compose.yml
:
selenium_hub:
image: selenium/hub
ports: ["4444:4444"]
links:
- selenium_firefox_worker
selenium_firefox_worker:
image: selenium/node-firefox
Yet after running docker-compose up
I get the message:
selenium_firefox_node_1 | Not linked with a running Hub container
selenium_firefox_node_1 exited with code 1
and hence the grid doesn't show any node.
I thought that I may be doing the linking in the wrong order, yet even:
selenium_hub:
image: selenium/hub
ports: ["4444:4444"]
selenium_firefox_node:
image: selenium/node-firefox
links:
- selenium_hub
yields in the same error.
What am I doing wrong?