Home

Awesome

Docker images for selenium grid extras Hub and Node with Chrome and Firefox

Images included:

All images are versioned after the Selenium-Grid-Extras release number.

The images can be found in the Docker Hub

Running the images

The easiest way is to run with docker-compose. There is at the root of the project a compose file (hub-chrome-firefox.yml) for running a Hub with 2 connected Nodes running Chrome and Firefox as an example:

docker-compose -f hub-chrome-firefox.yml up 

Obviously you can also use the same configuration with just plain docker command line.

Node tag explanation

The tag of the selenium nodes are composed by <selenium version>-<selenium grid extras version>-<browser version> (e.g. minium/selenium-grid-extras-chrome:3.8.1-2.0.4-70.0)

Configuring the containers

JAVA_OPTS Java Environment Options

You can pass JAVA_OPTS environment variable to java process in the docker command line, or by editing your docker-compose:

    environment:
      - JAVA_OPTS=-Xms512m -Xmx512m

SE_OPTS Selenium Configuration Options

You can pass SE_OPTS variable with additional commandline parameters for starting a hub or a node.

    environment:
      - SE_OPTS=-debug true   

Building the images

Clone the repo and from inside of each directoy you can build using docker-compose:

docker-compose build

Keep in mind the NodeBase needs to be built before NodeChrome and NodeFirefox

Using Makefile to build all:

SELENIUM_VERSION=3.8.1 SELENIUM_GRID_EXTRAS_VERSION=2.0.4 CHROME_VERSION=70.0 FIREFOX_VERSION=63.0 make build

Troubleshooting

In case you need to troubleshoot you can change LOG levels of different components, by changing your docker enviornments or providing a log4j.properties

    environment:
      - SE_OPTS=-debug true   
    volumes:
       - ./log4j.properties:/opt/selenium/log4j.properties

For more information see: https://github.com/groupon/Selenium-Grid-Extras#changing-the-logging-on-the-grid-hub-nodes-or-selenium-grid-extras

Known Issues: