Skip to content

Commit da26d7c

Browse files
author
Thomas Parikka
committed
Updated Dockerfile.txt and generate_config for Hub, NodeBase, NodeChrome, NodeFirefox.
1 parent 2b6bf9c commit da26d7c

18 files changed

+103
-61
lines changed

Hub/Dockerfile

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@ MAINTAINER Selenium <selenium-developers@googlegroups.com>
1111

1212
EXPOSE 4444
1313

14-
ENV GRID_THROW_ON_CAPABILITY_NOT_PRESENT true
15-
# In milliseconds
14+
# As integer, maps to "maxSession"
15+
ENV GRID_MAX_SESSION 5
16+
# In milliseconds, maps to "newSessionWaitTimeout"
1617
ENV GRID_NEW_SESSION_WAIT_TIMEOUT -1
18+
# As a boolean, maps to "throwOnCapabilityNotPresent"
19+
ENV GRID_THROW_ON_CAPABILITY_NOT_PRESENT true
20+
# As an integer
1721
ENV GRID_JETTY_MAX_THREADS -1
18-
# In milliseconds
19-
ENV GRID_NODE_POLLING 5000
20-
# In milliseconds
22+
# In milliseconds, maps to "cleanUpCycle"
2123
ENV GRID_CLEAN_UP_CYCLE 5000
22-
# In seconds
23-
ENV GRID_TIMEOUT 30
24-
# In seconds
24+
# In seconds, maps to "browserTimeout"
2525
ENV GRID_BROWSER_TIMEOUT 0
26-
ENV GRID_MAX_SESSION 5
27-
# In milliseconds
28-
ENV GRID_UNREGISTER_IF_STILL_DOWN_AFTER 30000
26+
# In seconds, maps to "timeout"
27+
ENV GRID_TIMEOUT 30
2928

3029
COPY generate_config /opt/selenium/generate_config
3130
COPY entry_point.sh /opt/bin/entry_point.sh
@@ -34,5 +33,4 @@ RUN chown -R seluser /opt/selenium
3433

3534
USER seluser
3635

37-
CMD ["/opt/bin/entry_point.sh"]
38-
36+
CMD ["/opt/bin/entry_point.sh"]

Hub/Dockerfile.txt

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ MAINTAINER Selenium <selenium-developers@googlegroups.com>
66

77
EXPOSE 4444
88

9-
ENV GRID_THROW_ON_CAPABILITY_NOT_PRESENT true
10-
# In milliseconds
9+
# As integer, maps to "maxSession"
10+
ENV GRID_MAX_SESSION 5
11+
# In milliseconds, maps to "newSessionWaitTimeout"
1112
ENV GRID_NEW_SESSION_WAIT_TIMEOUT -1
13+
# As a boolean, maps to "throwOnCapabilityNotPresent"
14+
ENV GRID_THROW_ON_CAPABILITY_NOT_PRESENT true
15+
# As an integer
1216
ENV GRID_JETTY_MAX_THREADS -1
13-
# In milliseconds
14-
ENV GRID_NODE_POLLING 5000
15-
# In milliseconds
17+
# In milliseconds, maps to "cleanUpCycle"
1618
ENV GRID_CLEAN_UP_CYCLE 5000
17-
# In seconds
18-
ENV GRID_TIMEOUT 30
19-
# In seconds
19+
# In seconds, maps to "browserTimeout"
2020
ENV GRID_BROWSER_TIMEOUT 0
21-
ENV GRID_MAX_SESSION 5
22-
# In milliseconds
23-
ENV GRID_UNREGISTER_IF_STILL_DOWN_AFTER 30000
21+
# In seconds, maps to "timeout"
22+
ENV GRID_TIMEOUT 30
2423

2524
COPY generate_config /opt/selenium/generate_config
2625
COPY entry_point.sh /opt/bin/entry_point.sh
@@ -29,5 +28,4 @@ RUN chown -R seluser /opt/selenium
2928

3029
USER seluser
3130

32-
CMD ["/opt/bin/entry_point.sh"]
33-
31+
CMD ["/opt/bin/entry_point.sh"]

Hub/entry_point.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ java ${JAVA_OPTS} -jar /opt/selenium/selenium-server-standalone.jar \
2626
NODE_PID=$!
2727

2828
trap shutdown SIGTERM SIGINT
29-
wait $NODE_PID
30-
29+
wait $NODE_PID

Hub/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ echo "# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED." >> ./Dockerfile
66
echo "# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE" >> ./Dockerfile
77
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ./Dockerfile
88
echo FROM selenium/base:$VERSION >> ./Dockerfile
9-
cat ./Dockerfile.txt >> ./Dockerfile
9+
cat ./Dockerfile.txt >> ./Dockerfile

Hub/generate_config

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,13 @@ echo "
44
{
55
\"host\": null,
66
\"port\": 4444,
7-
\"prioritizer\": null,
7+
\"maxSession\": $GRID_MAX_SESSION,
8+
\"newSessionWaitTimeout\": $GRID_NEW_SESSION_WAIT_TIMEOUT,
89
\"capabilityMatcher\": \"org.openqa.grid.internal.utils.DefaultCapabilityMatcher\",
910
\"throwOnCapabilityNotPresent\": $GRID_THROW_ON_CAPABILITY_NOT_PRESENT,
10-
\"newSessionWaitTimeout\": $GRID_NEW_SESSION_WAIT_TIMEOUT,
1111
\"jettyMaxThreads\": $GRID_JETTY_MAX_THREADS,
12-
\"nodePolling\": $GRID_NODE_POLLING,
1312
\"cleanUpCycle\": $GRID_CLEAN_UP_CYCLE,
14-
\"timeout\": $GRID_TIMEOUT,
1513
\"browserTimeout\": $GRID_BROWSER_TIMEOUT,
16-
\"maxSession\": $GRID_MAX_SESSION,
17-
\"unregisterIfStillDownAfter\": $GRID_UNREGISTER_IF_STILL_DOWN_AFTER
18-
}"
19-
20-
14+
\"timeout\": $GRID_TIMEOUT,
15+
\"prioritizer\": null,
16+
}"

NodeBase/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ ENV DISPLAY :99.0
3535

3636
USER seluser
3737

38-
CMD ["/opt/bin/entry_point.sh"]
38+
CMD ["/opt/bin/entry_point.sh"]

NodeBase/Dockerfile.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ ENV DISPLAY :99.0
3030

3131
USER seluser
3232

33-
CMD ["/opt/bin/entry_point.sh"]
33+
CMD ["/opt/bin/entry_point.sh"]

NodeBase/entry_point.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,4 @@ xvfb-run -n $SERVERNUM --server-args="-screen 0 $GEOMETRY -ac +extension RANDR"
4444
NODE_PID=$!
4545

4646
trap shutdown SIGTERM SIGINT
47-
wait $NODE_PID
47+
wait $NODE_PID

NodeBase/functions.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@
33
# https://github.com/SeleniumHQ/docker-selenium/issues/184
44
function get_server_num() {
55
echo $(echo $DISPLAY | sed -r -e 's/([^:]+)?:([0-9]+)(\.[0-9]+)?/\2/')
6-
}
7-
6+
}

NodeBase/generate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ echo "# NOTE: DO *NOT* EDIT THIS FILE. IT IS GENERATED." >> ./Dockerfile
66
echo "# PLEASE UPDATE Dockerfile.txt INSTEAD OF THIS FILE" >> ./Dockerfile
77
echo "# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" >> ./Dockerfile
88
echo FROM selenium/base:$VERSION >> ./Dockerfile
9-
cat ./Dockerfile.txt >> ./Dockerfile
9+
cat ./Dockerfile.txt >> ./Dockerfile

0 commit comments

Comments
 (0)