Public Repository

Last pushed: a year ago
Short Description
Fork of the selenium/node-phantomjs image where I am trying to allow node port customization.
Full Description

How to use this image

First, you will need a Selenium Grid Hub that the Node will connect to.

$ docker run -d -P --name selenium-hub selenium/hub

Once the hub is up and running will want to launch nodes that can run tests. You can run as many nodes as you wish.

$ docker run -d --link selenium-hub:hub selenium/node-phantomjs

How this is repo different?

To remote connect to a hub with multiple nodes you could setup multiple docker containers however you will be forced to use the default 4444 port. This image lets you define the port, the downside is... as of today I can't know how to make the running container self aware of what port is mapped over to the local webdriver.

$ docker run docker run -d -e HUB_ADDR=<hub-ip-address> -e HUB_PORT=4444 -e NODE_PORT=<node-port> -e IP=<docker-host-ip> -p <node-port>:<node-port> lv2program/node-phantomjs

HUB_ADDR = address of the remote hub
HUB_PORT = exposed port of the remote hub
NODE_PORT = port on this docker machine to be used
IP = address of the docker host the image will run on
-p <node-port>:<node-port> = you must forward the port from and to the port defined in NODE_PORT above.

Docker Pull Command