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
7 changes: 4 additions & 3 deletions Base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -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" \
Expand Down
2 changes: 0 additions & 2 deletions NodeBase/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 8 additions & 1 deletion NodeDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=$!
Expand Down
2 changes: 0 additions & 2 deletions Sessions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions Standalone/start-selenium-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down Expand Up @@ -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} &

Expand Down
5 changes: 4 additions & 1 deletion StandaloneDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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=$!
Expand Down
Loading