Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions NodeBase/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if [ ! -e /opt/selenium/config.json ]; then
exit 1
fi

if [ ! -z "$HUB_HOST" ]; then
echo "Connecting to the selenium hub using the host string ${HUB_HOST}"
HUB_PORT_4444_TCP_ADDR=$HUB_HOST
fi

if [ -z "$HUB_PORT_4444_TCP_ADDR" ]; then
echo Not linked with a running Hub container 1>&2
exit 1
Expand Down
5 changes: 5 additions & 0 deletions NodeChromeDebug/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if [ ! -e /opt/selenium/config.json ]; then
exit 1
fi

if [ ! -z "$HUB_HOST" ]; then
echo "Connecting to the selenium hub using the host string ${HUB_HOST}"
HUB_PORT_4444_TCP_ADDR=$HUB_HOST
fi

if [ -z "$HUB_PORT_4444_TCP_ADDR" ]; then
echo Not linked with a running Hub container 1>&2
exit 1
Expand Down
5 changes: 5 additions & 0 deletions NodeFirefoxDebug/entry_point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ if [ ! -e /opt/selenium/config.json ]; then
exit 1
fi

if [ ! -z "$HUB_HOST" ]; then
echo "Connecting to the selenium hub using the host string ${HUB_HOST}"
HUB_PORT_4444_TCP_ADDR=$HUB_HOST
fi

if [ -z "$HUB_PORT_4444_TCP_ADDR" ]; then
echo Not linked with a running Hub container 1>&2
exit 1
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,20 @@ $ docker run -d --link selenium-hub:hub selenium/node-chrome:2.48.2
$ docker run -d --link selenium-hub:hub selenium/node-firefox:2.48.2
```

### Hub and Nodes Using Docker Networking
``` bash
docker network create selenium-network
docker run -d -p 4444:4444 --net=selenium-network --name selenium-hub selenium/hub:2.48.2
docker run -d --net=selenium-network -e HUB_HOST=selenium-hub selenium/node-chrome:2.48.2
docker run -d --net=selenium-network -e HUB_HOST=selenium-hub selenium/node-firefox:2.48.2
```
You can also pass in an IP address, if your selenium hub is location on a different physical machine:
``` bash
docker run -d -e HUB_HOST=10.0.0.1:4444 selenium/node-chrome:2.48.2
docker run -d -e HUB_HOST=10.0.0.1:4444 selenium/node-firefox:2.48.2
```


### JAVA_OPTS Java Environment Options

You can pass `JAVA_OPTS` environment variable to java process.
Expand Down