From ffc839732705671e295a5d6836d11fc752028080 Mon Sep 17 00:00:00 2001 From: Jakub Raczek Date: Thu, 28 Nov 2024 07:58:29 +0100 Subject: [PATCH] Update Dockerfile --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 628915fd..8d2e67e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,9 +15,12 @@ RUN apt-get update && apt-get install -y gnupg \ #========= # Chrome driver #========= -RUN CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") \ +RUN CHROMEVER=$(google-chrome --product-version | grep -oE "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+") \ && DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") \ - && if [ -z "$DRIVERVER" ]; then echo "Failed to get ChromeDriver version"; exit 1; fi \ + && if [ -z "$DRIVERVER" ]; then \ + echo "Failed to get ChromeDriver version, falling back to latest"; \ + DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"); \ + fi \ && wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" \ && unzip /chromedriver/chromedriver* -d /chromedriver #=========