diff --git a/selenium-wrappers/selenium-node-chrome/Dockerfile b/selenium-wrappers/selenium-node-chrome/Dockerfile new file mode 100644 index 000000000..0a4e5bd03 --- /dev/null +++ b/selenium-wrappers/selenium-node-chrome/Dockerfile @@ -0,0 +1,12 @@ +FROM selenium/node-chrome:4.0.0-beta-1-prerelease-20201202 + +USER 1200 + +# Copying configuration script generator +COPY generate_config /opt/bin/generate_config + +# Generating a default config during build time +RUN /opt/bin/generate_config + + +EXPOSE 5900 diff --git a/selenium-wrappers/selenium-node-chrome/generate_config b/selenium-wrappers/selenium-node-chrome/generate_config new file mode 100755 index 000000000..ad1db5c73 --- /dev/null +++ b/selenium-wrappers/selenium-node-chrome/generate_config @@ -0,0 +1,53 @@ +#!/bin/bash + +echo "[events] +publish = \"tcp://${SE_EVENT_BUS_HOST}:${SE_EVENT_BUS_PUBLISH_PORT}\" +subscribe = \"tcp://${SE_EVENT_BUS_HOST}:${SE_EVENT_BUS_SUBSCRIBE_PORT}\" +" > /opt/selenium/config.toml + +if [[ -z "${SE_NODE_HOST}" ]] || [[ -z "${SE_NODE_PORT}" ]]; then + echo "Configuring server..." +else + echo "[server]" >> /opt/selenium/config.toml +fi + +if [[ -z "${SE_NODE_HOST}" ]]; then + echo "Setting up SE_NODE_HOST..." +else + echo "hostname = \"${SE_NODE_HOST}\"" >> /opt/selenium/config.toml +fi + +if [[ -z "${SE_NODE_PORT}" ]]; then + echo "Setting up SE_NODE_PORT..." +else + echo "port = \"${SE_NODE_PORT}\"" >> /opt/selenium/config.toml +fi + +echo "[node] +max-concurrent-sessions = ${SE_NODE_MAX_CONCURRENT_SESSIONS} +" >> /opt/selenium/config.toml + +echo "[logging] +# Configure logging +# Type: boolean +enable = true + +# Log encoding +# Type: string +log-encoding = UTF-8 + +# File to write out logs +# Type: string +#log-file = /test.log + +# Use plain log lines +# Type: boolean +plain-logs = true + +# Use structured logs +# Type: boolean +structured-logs = false + +# Enable trace collection +# Type: boolean +tracing = true" >> /opt/selenium/config.toml