I can run the image of the selenium node through:
docker run --rm=true -P -p 4444:4444 --name selenium-hub selenium/hub
and add firefox worker via:
docker run --rm=true --link selenium-hub:hub selenium/node-firefox
Going to http: // localhost: 4444 / grid / console will then show the grid simply.
I do not want to use docker every time, but I have the same setup through docker-compose .
Therefore, 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
However, after running docker-compose up I get a message:
selenium_firefox_node_1 | Not linked with a running Hub container selenium_firefox_node_1 exited with code 1
and therefore the grid does not display node.
I thought I could make the link in the wrong order, but even:
selenium_hub: image: selenium/hub ports: ["4444:4444"] selenium_firefox_node: image: selenium/node-firefox links: - selenium_hub
gives the same error.
What am I doing wrong?
source share