Merge pull request #71 from linuxserver/70-bug-wrong-chrome-driver-version

Download the same chromedriver version as the installed chrome version.
This commit is contained in:
Adam 2026-02-01 12:06:01 +00:00 committed by GitHub
commit edf88e552d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -30,8 +30,13 @@ RUN \
xserver-xephyr \
xvfb && \
echo "**** install chrome driver ****" && \
CHROME_RELEASE=$(curl -sLk https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE) && \
echo "Retrieving Chrome driver version ${CHROME_RELEASE}" && \
CHROME_VERSION=$(google-chrome --version | awk '{print $3}') && \
CHROME_MAJOR=${CHROME_VERSION%%.*} && \
CHROME_RELEASE=$(curl -fsSLk "https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_${CHROME_MAJOR}" || true) && \
if [ -z "${CHROME_RELEASE}" ]; then \
CHROME_RELEASE=$(curl -fsSLk https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE); \
fi && \
echo "Installed Chrome ${CHROME_VERSION}; retrieving ChromeDriver ${CHROME_RELEASE}" && \
curl -sk -o \
/tmp/chrome.zip -L \
"https://storage.googleapis.com/chrome-for-testing-public/${CHROME_RELEASE}/linux64/chromedriver-linux64.zip" && \