Skip to content

Getting Started with Hub and Nodes

Dj edited this page Apr 13, 2017 · 6 revisions

Getting Started with Hub & Nodes

This is a step-by-step introduction to using the official Selenium Docker images using a basic hub/node configuration.

Step 1: Pulling down the hub / nodes

$ docker pull selenium/hub selenium/node-chrome selenium/node-firefox

This will pull from hub.docker.com, the three official images. Note: when you omit a version at the end, it will default to "latest" tag. To specify a version, simply add :<version> at the end. E.g: selenium/hub:3.3.1

Step 2: Bringing up the hub / nodes

Now that we have the images pulled down, let's run them.

Running the Hub

$ docker run -p 4444:4444 --name selenium-hub selenium/hub
# Run the hub, forwarding the "4444" port from the docker container to the host machine.

Running the Chrome node

$ docker run --link selenium-hub:hub selenium/node-chrome
# Run the chrome node and link it to the `--name` we specified for the hub.

Running the Firefox node

$ docker run --link selenium-hub:hub selenium/node-chrome
# Run the firefox node and link it to the `--name` we specified for the hub.

Step 3: Running tests

Clone this wiki locally