Public Repository

Last pushed: a year ago
Short Description
A selenium node container
Full Description

This container is designed to be used with docker-compose, and is scalable.

Dockerfile contents:

FROM clovernetwork/selenium-core

# Add Chrome to the apt-get list
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
  echo "deb http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list

RUN apt-get update -y && apt-get install -y \
    google-chrome-stable \
    firefox \
    xvfb \
    unzip

RUN wget http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip && \
    unzip chromedriver_linux64.zip -d /usr/local/bin

COPY run.sh /
COPY node_config.json /

run.sh contents:

xvfb-run --server-args=":99.0 -screen 0 2000x2000x16 -ac" \
java -jar ${SELENIUM_JAR} -role node -hub http://selenium-hub:4444/grid/register -nodeConfig node_config.json

node_config.json contents:

{
  "capabilities": [
    {
      "browserName": "firefox",
      "platform": "LINUX",
      "maxInstances": 1
    },
    {
      "browserName": "chrome",
      "platform": "LINUX",
      "maxInstances": 1
    }
  ],
  "configuration": {
    "nodeTimeout":120000,
    "port":5555,
    "nodePolling":2000,
    "registerCycle":10000,
    "register":true,
    "cleanUpCycle":2000,
    "maxSession":1
  }
}
Docker Pull Command
Owner
clovernetwork

Comments (0)