Skip to content

Commit ef8b4fc

Browse files
committed
Make Selenium image configurable
In certain environments, we may want to customise the docker image e.g. to use a proxy to avoid docker hub rate limiting. The default behaviour remains unchanged. The `if` logic was broken because `uname -a` returns the entire uname, including OS, Kernel version, machine type and what not. The string always starts with the OS i.e. Linux or Darwin, therefore, the matching for `arm*` was always false; therefore, it was always defaulting to the `else` image, which happens to be multi-arch. However, it was using `seleniarm`, which is a community driven effort, not the official Selenium account. In the official OSS image, version 123.0 is too old. The oldest available is 127.0. This commit bumps to the latest available. We could consider depending on version `4`. Version `4` refers to Selenium version, whilst version 123.0/133.0 refer to the browser version.
1 parent 6c10cea commit ef8b4fc

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

selenium/bin/components/selenium

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#!/usr/bin/env bash
22

3-
arch=$(uname -a)
4-
if [[ $arch == arm* ]]; then
5-
SELENIUM_DOCKER_IMAGE=selenium/standalone-chrome:123.0
6-
else
7-
SELENIUM_DOCKER_IMAGE=seleniarm/standalone-chromium:123.0
8-
fi
3+
# selenium/standalone-chromium is multi-arch
4+
# https://hub.docker.com/r/selenium/standalone-chromium/tags
5+
SELENIUM_DOCKER_IMAGE=${SELENIUM_DOCKER_IMAGE:-selenium/standalone-chromium:133.0}
96

107
start_selenium() {
118
begin "Starting selenium ..."

0 commit comments

Comments
 (0)