Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
raczeja authored Nov 28, 2024
1 parent e1a9222 commit ffc8397
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
#=========
Expand Down

0 comments on commit ffc8397

Please sign in to comment.