Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 87017bb

Browse files
Merge branch 'trunk' of https://github.com/SeleniumHQ/docker-selenium into trunk
2 parents 7e88b4e + ad2f748 commit 87017bb

33 files changed

+583
-150
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,6 @@ body:
5555
attributes:
5656
label: Docker Selenium version (tag)
5757
description: What version of Docker Selenium are you using?
58-
placeholder: 4.5.3-20221024? Please use the full tag, avoid "latest"
58+
placeholder: 4.6.0-20221104? Please use the full tag, avoid "latest"
5959
validations:
6060
required: true

Base/Dockerfile

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,26 @@ COPY supervisord.conf /etc
9090
RUN mkdir -p /opt/selenium /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
9191
&& touch /opt/selenium/config.toml \
9292
&& chmod -R 777 /opt/selenium /opt/selenium/assets /var/run/supervisor /var/log/supervisor /etc/passwd \
93-
&& wget --no-verbose https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.5.0/selenium-server-4.5.3.jar \
93+
&& wget --no-verbose https://github.com/SeleniumHQ/selenium/releases/download/selenium-4.6.0/selenium-server-4.6.0.jar \
9494
-O /opt/selenium/selenium-server.jar \
95-
&& wget --no-verbose https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-http-jdk-client/4.5.3/selenium-http-jdk-client-4.5.3.jar \
95+
&& wget --no-verbose https://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-http-jdk-client/4.6.0/selenium-http-jdk-client-4.6.0.jar \
9696
-O /opt/selenium/selenium-http-jdk-client.jar \
9797
&& chgrp -R 0 /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor \
9898
&& chmod -R g=u /opt/selenium ${HOME} /opt/selenium/assets /var/run/supervisor /var/log/supervisor
9999

100+
#=====
101+
# Download observability related jaegar jars and make them available in a separate directory
102+
# so that the container can skip downloading them everytime it comes up
103+
#=====
104+
RUN curl -fL https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz | gzip -d > /tmp/cs \
105+
&& chmod +x /tmp/cs \
106+
&& mkdir -p /external_jars \
107+
&& chmod -R 777 /external_jars
108+
109+
RUN /tmp/cs fetch --classpath --cache /external_jars io.opentelemetry:opentelemetry-exporter-jaeger:1.19.0 io.grpc:grpc-netty:1.50.2 > /external_jars/.classpath.txt
110+
111+
RUN chmod 777 /external_jars/.classpath.txt
112+
100113
#===================================================
101114
# Run the following commands as non-privileged user
102115
#===================================================
@@ -105,6 +118,4 @@ USER 1200:1201
105118
# Boolean value, maps "--bind-host"
106119
ENV SE_BIND_HOST false
107120

108-
109-
110121
CMD ["/opt/bin/entry_point.sh"]

Distributor/start-selenium-grid-distributor.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,20 @@ if [ ! -z "$SE_DISTRIBUTOR_PORT" ]; then
5454
PORT_CONFIG="--port ${SE_DISTRIBUTOR_PORT}"
5555
fi
5656

57+
EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
58+
59+
if [ ! -z "$SE_ENABLE_TRACING" ]; then
60+
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
61+
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
62+
echo "Tracing is enabled"
63+
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
64+
else
65+
echo "Tracing is disabled"
66+
fi
5767

5868
java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
5969
-jar /opt/selenium/selenium-server.jar \
60-
--ext /opt/selenium/selenium-http-jdk-client.jar distributor \
70+
--ext ${EXTRA_LIBS} distributor \
6171
--sessions-host "${SE_SESSIONS_MAP_HOST}" --sessions-port "${SE_SESSIONS_MAP_PORT}" \
6272
--sessionqueue-host "${SE_SESSION_QUEUE_HOST}" --sessionqueue-port "${SE_SESSION_QUEUE_PORT}" \
6373
--publish-events tcp://"${SE_EVENT_BUS_HOST}":"${SE_EVENT_BUS_PUBLISH_PORT}" \

EventBus/start-selenium-grid-eventbus.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,20 @@ if [ ! -z "$SE_OPTS" ]; then
1919
echo "Appending Selenium options: ${SE_OPTS}"
2020
fi
2121

22+
EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
23+
24+
if [ ! -z "$SE_ENABLE_TRACING" ]; then
25+
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
26+
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
27+
echo "Tracing is enabled"
28+
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
29+
else
30+
echo "Tracing is disabled"
31+
fi
32+
2233
java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
2334
-jar /opt/selenium/selenium-server.jar \
24-
--ext /opt/selenium/selenium-http-jdk-client.jar event-bus \
35+
--ext ${EXTRA_LIBS} event-bus \
2536
--bind-host ${SE_BIND_HOST} \
2637
${HOST_CONFIG} \
2738
${PORT_CONFIG} \

Hub/start-selenium-grid-hub.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,21 @@ if [ ! -z "$SE_HUB_PORT" ]; then
1717
PORT_CONFIG="--port ${SE_HUB_PORT}"
1818
fi
1919

20+
EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
21+
22+
if [ ! -z "$SE_ENABLE_TRACING" ]; then
23+
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
24+
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
25+
echo "Tracing is enabled"
26+
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
27+
else
28+
echo "Tracing is disabled"
29+
fi
30+
31+
2032
java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
2133
-jar /opt/selenium/selenium-server.jar \
22-
--ext /opt/selenium/selenium-http-jdk-client.jar hub \
34+
--ext ${EXTRA_LIBS} hub \
2335
--session-request-timeout ${SE_SESSION_REQUEST_TIMEOUT} \
2436
--session-retry-interval ${SE_SESSION_RETRY_INTERVAL} \
2537
--relax-checks ${SE_RELAX_CHECKS} \

NodeBase/start-selenium-node.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,25 @@ if [ "$GENERATE_CONFIG" = true ]; then
3535
echo "Generating Selenium Config"
3636
/opt/bin/generate_config
3737
fi
38+
39+
EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
40+
41+
if [ ! -z "$SE_ENABLE_TRACING" ]; then
42+
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
43+
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
44+
echo "Tracing is enabled"
45+
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
46+
else
47+
echo "Tracing is disabled"
48+
fi
49+
3850
echo "Selenium Grid Node configuration: "
3951
cat "$CONFIG_FILE"
4052
echo "Starting Selenium Grid Node..."
4153

4254
java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
4355
-jar /opt/selenium/selenium-server.jar \
44-
--ext /opt/selenium/selenium-http-jdk-client.jar node \
56+
--ext ${EXTRA_LIBS} node \
4557
--bind-host ${SE_BIND_HOST} \
4658
--config "$CONFIG_FILE" \
4759
${SE_OPTS}

NodeDocker/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
# Configs have a mapping between the Docker image to use and the capabilities that need to be matched to
33
# start a container with the given image.
44
configs = [
5-
"selenium/standalone-firefox:4.5.3-20221024", '{"browserName": "firefox", "platformName": "linux"}',
6-
"selenium/standalone-chrome:4.5.3-20221024", '{"browserName": "chrome", "platformName": "linux"}',
7-
"selenium/standalone-edge:4.5.3-20221024", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
5+
"selenium/standalone-firefox:4.6.0-20221104", '{"browserName": "firefox", "platformName": "linux"}',
6+
"selenium/standalone-chrome:4.6.0-20221104", '{"browserName": "chrome", "platformName": "linux"}',
7+
"selenium/standalone-edge:4.6.0-20221104", '{"browserName": "MicrosoftEdge", "platformName": "linux"}'
88
]
99

1010
# URL for connecting to the docker daemon
@@ -14,7 +14,7 @@ configs = [
1414
# socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock
1515
url = "http://127.0.0.1:2375"
1616
# Docker image used for video recording
17-
video-image = "selenium/video:ffmpeg-4.3.1-20221024"
17+
video-image = "selenium/video:ffmpeg-4.3.1-20221104"
1818

1919
# Uncomment the following section if you are running the node on a separate VM
2020
# Fill out the placeholders with appropriate values

NodeDocker/start-selenium-grid-docker.sh

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,20 @@ if [ ! -z "$SE_NODE_GRID_URL" ]; then
2929
SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}"
3030
fi
3131

32+
EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
33+
34+
if [ ! -z "$SE_ENABLE_TRACING" ]; then
35+
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
36+
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
37+
echo "Tracing is enabled"
38+
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
39+
else
40+
echo "Tracing is disabled"
41+
fi
42+
3243
java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
3344
-jar /opt/selenium/selenium-server.jar \
34-
--ext /opt/selenium/selenium-http-jdk-client.jar node \
45+
--ext ${EXTRA_LIBS} node \
3546
--publish-events tcp://"${SE_EVENT_BUS_HOST}":${SE_EVENT_BUS_PUBLISH_PORT} \
3647
--subscribe-events tcp://"${SE_EVENT_BUS_HOST}":${SE_EVENT_BUS_SUBSCRIBE_PORT} \
3748
--bind-host ${SE_BIND_HOST} \

0 commit comments

Comments
 (0)