Skip to content
Merged
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
2 changes: 1 addition & 1 deletion Hub/start-selenium-hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ if [ ! -z "$SE_OPTS" ]; then
echo "Appending Selenium options: ${SE_OPTS}"
fi

java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
java ${JAVA_OPTS} -cp ${JAVA_CLASSPATH:-"/opt/selenium/*:."} org.openqa.grid.selenium.GridLauncherV3 \
-role hub \
-hubConfig ${CONF} \
${SE_OPTS}
3 changes: 1 addition & 2 deletions NodeBase/start-selenium-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ fi

rm -f /tmp/.X*lock

java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
java ${JAVA_OPTS} -cp ${JAVA_CLASSPATH:-"/opt/selenium/*:."} org.openqa.grid.selenium.GridLauncherV3 \
-role node \
-hub http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT/grid/register \
${REMOTE_HOST_PARAM} \
-nodeConfig /opt/selenium/config.json \
${SE_OPTS}

10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ You can pass `SE_OPTS` variable with additional commandline parameters for start
$ docker run -d -p 4444:4444 -e SE_OPTS="-debug" --name selenium-hub selenium/hub:3.141.59-radium
```

### JAVA_CLASSPATH Java classpath

By default, `CLASSPATH` for Java is `/opt/selenium/*:.` but you can overwrite it with yours using `JAVA_CLASSPATH`. This is useful when you want to use your own JAR files. Note that `/opt/selenium/*` always needs to be included because the Selenium JAR file is in the directory.

```bash
$ docker run -d -p 4444:4444 -v $(pwd):/mnt -e JAVA_CLASSPATH="/mnt/*:/opt/selenium/*:." -e SE_OPTS="-servlets com.example.your.AwesomeServlet" --name selenium-hub selenium/hub:3.141.59-radium
```

### Selenium Hub and Node Configuration options

For special network configurations or when the hub and the nodes are running on different machines `HUB_HOST` and `HUB_PORT`
Expand Down Expand Up @@ -285,7 +293,7 @@ To avoid starting the server you can set the `START_XVFB` environment variable t

``` bash
$ docker run -d --net grid -e HUB_HOST=selenium-hub -e START_XVFB=false -v /dev/shm:/dev/shm selenium/node-chrome
```
```

For more information, see this Github [issue](https://github.com/SeleniumHQ/docker-selenium/issues/567).

Expand Down
2 changes: 1 addition & 1 deletion Standalone/start-selenium-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
#
# IMPORTANT: Change this file only in directory Standalone!

java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
java ${JAVA_OPTS} -cp ${JAVA_CLASSPATH:-"/opt/selenium/*:."} org.openqa.grid.selenium.GridLauncherV3 \
${SE_OPTS}