diff --git a/Base/Dockerfile b/Base/Dockerfile index 6a163ab783..7726c488d5 100644 --- a/Base/Dockerfile +++ b/Base/Dockerfile @@ -36,7 +36,9 @@ ENV DEBIAN_FRONTEND=noninteractive \ HOME=${HOME} \ TZ=${TZ} \ SEL_DOWNLOAD_DIR=${HOME}/Downloads \ - VIDEO_FOLDER="/videos" + VIDEO_FOLDER="/videos" \ + # Path to the Configfile + CONFIG_FILE="/opt/selenium/config.toml" #======================== # Miscellaneous packages @@ -100,7 +102,7 @@ RUN --mount=type=secret,id=SEL_PASSWD \ ${HOME}/.mozilla ${HOME}/.vnc ${HOME}/.pki/nssdb ${VIDEO_FOLDER} \ # NSSDB initialization with an empty password && certutil -d sql:${HOME}/.pki/nssdb -N --empty-password \ - && touch /opt/selenium/config.toml \ + && touch ${CONFIG_FILE} \ && chown -R ${SEL_USER}:${SEL_GROUP} /opt/selenium /var/run/supervisor /var/log/supervisor /etc/passwd ${HOME} ${VIDEO_FOLDER} \ && chmod -R 775 /opt/selenium /var/run/supervisor /var/log/supervisor /etc/passwd ${HOME} ${VIDEO_FOLDER} \ && wget --no-verbose https://github.com/${AUTHORS}/selenium/releases/download/${RELEASE}/selenium-server-${VERSION}.jar \ @@ -171,7 +173,6 @@ RUN /opt/bin/add-jks-helper.sh -d /opt/selenium/secrets \ # Boolean value, maps "--bind-host" ENV SE_BIND_HOST="false" \ SE_SERVER_PROTOCOL="http" \ - CONFIG_FILE="/opt/selenium/config.toml" \ # Boolean value, maps "--reject-unsupported-caps" SE_REJECT_UNSUPPORTED_CAPS="false" \ SE_OTEL_JAVA_GLOBAL_AUTOCONFIGURE_ENABLED="true" \ diff --git a/NodeBase/Dockerfile b/NodeBase/Dockerfile index ccd4265ca3..a66bd76b1a 100644 --- a/NodeBase/Dockerfile +++ b/NodeBase/Dockerfile @@ -65,8 +65,6 @@ ENV LANG_WHICH=${LANG_WHICH} \ SE_VNC_PORT="5900" \ DISPLAY=":99.0" \ DISPLAY_NUM="99" \ - # Path to the Configfile - CONFIG_FILE="/opt/selenium/config.toml" \ GENERATE_CONFIG="true" \ # Following line fixes https://github.com/SeleniumHQ/docker-selenium/issues/87 DBUS_SESSION_BUS_ADDRESS="/dev/null" diff --git a/NodeDocker/start-selenium-grid-docker.sh b/NodeDocker/start-selenium-grid-docker.sh index 90dcca3f8e..940e44c204 100755 --- a/NodeDocker/start-selenium-grid-docker.sh +++ b/NodeDocker/start-selenium-grid-docker.sh @@ -89,6 +89,13 @@ if [ "${SE_ENABLE_TLS}" = "true" ]; then fi fi +if [ ! -z "${SE_NODE_DOCKER_CONFIG_FILENAME}" ]; then + CONFIG_FILE="/opt/selenium/${SE_NODE_DOCKER_CONFIG_FILENAME}" +fi + +echo "Selenium Grid Node Docker configuration: " +cat "${CONFIG_FILE}" + EXTRA_LIBS="" if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then @@ -143,7 +150,7 @@ java ${JAVA_OPTS:-$SE_JAVA_OPTS} \ --subscribe-events tcp://"${SE_EVENT_BUS_HOST}":${SE_EVENT_BUS_SUBSCRIBE_PORT} \ --bind-host ${SE_BIND_HOST} \ --detect-drivers false \ - --config /opt/selenium/${SE_NODE_DOCKER_CONFIG_FILENAME:-"config.toml"} \ + --config ${CONFIG_FILE} \ ${SE_GRID_URL} ${SE_OPTS} & SELENIUM_SERVER_PID=$! diff --git a/Sessions/Dockerfile b/Sessions/Dockerfile index 5c981dd8dc..9f72ecea11 100644 --- a/Sessions/Dockerfile +++ b/Sessions/Dockerfile @@ -21,7 +21,5 @@ USER ${SEL_UID} EXPOSE 5556 ENV SE_OTEL_SERVICE_NAME="selenium-session-map" \ - # Path to the Configfile - CONFIG_FILE="/opt/selenium/config.toml" \ GENERATE_CONFIG="true" \ SE_SESSIONS_MAP_EXTERNAL_DATASTORE="false" diff --git a/Standalone/start-selenium-standalone.sh b/Standalone/start-selenium-standalone.sh index f3f23090d7..1801136ef7 100755 --- a/Standalone/start-selenium-standalone.sh +++ b/Standalone/start-selenium-standalone.sh @@ -125,7 +125,7 @@ fi /opt/bin/generate_relay_config echo "Selenium Grid Standalone configuration: " -cat /opt/selenium/config.toml +cat "${CONFIG_FILE}" echo "Starting Selenium Grid Standalone..." EXTRA_LIBS="" @@ -191,7 +191,7 @@ java ${JAVA_OPTS:-$SE_JAVA_OPTS} \ --relax-checks ${SE_RELAX_CHECKS} \ --detect-drivers false \ --bind-host ${SE_BIND_HOST} \ - --config /opt/selenium/config.toml \ + --config ${CONFIG_FILE} \ ${SUB_PATH_CONFIG} \ ${SE_OPTS} & diff --git a/StandaloneDocker/start-selenium-grid-docker.sh b/StandaloneDocker/start-selenium-grid-docker.sh index cb8bc1dcb9..bede3a55a0 100755 --- a/StandaloneDocker/start-selenium-grid-docker.sh +++ b/StandaloneDocker/start-selenium-grid-docker.sh @@ -94,6 +94,9 @@ if [ "${SE_ENABLE_TLS}" = "true" ]; then fi fi +echo "Selenium Grid Standalone Docker configuration: " +cat "${CONFIG_FILE}" + EXTRA_LIBS="" if [ "${SE_ENABLE_TRACING}" = "true" ] && [ -n "${SE_OTEL_EXPORTER_ENDPOINT}" ]; then @@ -149,7 +152,7 @@ java ${JAVA_OPTS:-$SE_JAVA_OPTS} \ --relax-checks ${SE_RELAX_CHECKS} \ --detect-drivers false \ --bind-host ${SE_BIND_HOST} \ - --config /opt/selenium/config.toml \ + --config ${CONFIG_FILE} \ ${SE_GRID_URL} ${SE_OPTS} & SELENIUM_SERVER_PID=$!