Skip to content

Commit 1e3a809

Browse files
author
rubytester
committed
merge feature JAVA_OPTS env variable to control java process
2 parents a31503f + 4a8e19c commit 1e3a809

File tree

11 files changed

+18
-6
lines changed

11 files changed

+18
-6
lines changed

Hub/entry_point.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function shutdown {
1515
}
1616

1717
java -jar /opt/selenium/selenium-server-standalone.jar \
18+
${JAVA_OPTS} \
1819
-role hub \
1920
-hubConfig $CONF &
2021
NODE_PID=$!

NodeBase/entry_point.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ fi
2626

2727
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
2828
java -jar /opt/selenium/selenium-server-standalone.jar \
29+
${JAVA_OPTS} \
2930
-role node \
3031
-hub http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT/grid/register \
3132
${REMOTE_HOST_PARAM} \

NodeChromeDebug/entry_point.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ sudo -E -i -u seluser \
2828
DISPLAY=$DISPLAY \
2929
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
3030
java -jar /opt/selenium/selenium-server-standalone.jar \
31+
${JAVA_OPTS} \
3132
-role node \
3233
-hub http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT/grid/register \
3334
${REMOTE_HOST_PARAM} \

NodeFirefoxDebug/entry_point.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ sudo -E -i -u seluser \
2828
DISPLAY=$DISPLAY \
2929
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
3030
java -jar /opt/selenium/selenium-server-standalone.jar \
31+
${JAVA_OPTS} \
3132
-role node \
3233
-hub http://$HUB_PORT_4444_TCP_ADDR:$HUB_PORT_4444_TCP_PORT/grid/register \
3334
${REMOTE_HOST_PARAM} \

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,14 @@ $ docker run -d --link selenium-hub:hub selenium/node-chrome:2.46.0
4848
$ docker run -d --link selenium-hub:hub selenium/node-firefox:2.46.0
4949
```
5050

51+
### Java Environment Options
52+
53+
You can pass JAVA_OPTS environment variable to selenium java processes.
54+
55+
``` bash
56+
$ docker run -d -p 4444:4444 -e JAVA_OPTS=-Xmx512m --name selenium-hub selenium/hub:2.46.0
57+
```
58+
5159
## Building the images
5260

5361
Ensure you have the `ubuntu:14.04` base image downloaded, this step is _optional_ since docker takes care of downloading the parent base image automatically.

Standalone/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function shutdown {
77
}
88

99
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
10-
java -jar /opt/selenium/selenium-server-standalone.jar &
10+
java -jar /opt/selenium/selenium-server-standalone.jar ${JAVA_OPTS} &
1111
NODE_PID=$!
1212

1313
trap shutdown SIGTERM SIGINT

StandaloneChrome/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function shutdown {
77
}
88

99
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
10-
java -jar /opt/selenium/selenium-server-standalone.jar &
10+
java -jar /opt/selenium/selenium-server-standalone.jar ${JAVA_OPTS} &
1111
NODE_PID=$!
1212

1313
trap shutdown SIGTERM SIGINT

StandaloneDebug/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function shutdown {
99
sudo -E -i -u seluser \
1010
DISPLAY=$DISPLAY \
1111
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
12-
java -jar /opt/selenium/selenium-server-standalone.jar &
12+
java -jar /opt/selenium/selenium-server-standalone.jar ${JAVA_OPTS} &
1313
NODE_PID=$!
1414

1515
trap shutdown SIGTERM SIGINT

StandaloneDebugChrome/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function shutdown {
99
sudo -E -i -u seluser \
1010
DISPLAY=$DISPLAY \
1111
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
12-
java -jar /opt/selenium/selenium-server-standalone.jar &
12+
java -jar /opt/selenium/selenium-server-standalone.jar ${JAVA_OPTS} &
1313
NODE_PID=$!
1414

1515
trap shutdown SIGTERM SIGINT

StandaloneDebugFirefox/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function shutdown {
99
sudo -E -i -u seluser \
1010
DISPLAY=$DISPLAY \
1111
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
12-
java -jar /opt/selenium/selenium-server-standalone.jar &
12+
java -jar /opt/selenium/selenium-server-standalone.jar ${JAVA_OPTS} &
1313
NODE_PID=$!
1414

1515
trap shutdown SIGTERM SIGINT

StandaloneFirefox/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function shutdown {
77
}
88

99
xvfb-run --server-args="$DISPLAY -screen 0 $GEOMETRY -ac +extension RANDR" \
10-
java -jar /opt/selenium/selenium-server-standalone.jar &
10+
java -jar /opt/selenium/selenium-server-standalone.jar ${JAVA_OPTS} &
1111
NODE_PID=$!
1212

1313
trap shutdown SIGTERM SIGINT

0 commit comments

Comments
 (0)