Skip to content

Commit 6c5559a

Browse files
committed
[FIX] image: update chromedriver to always use version of current chrome
1 parent 483eaa9 commit 6c5559a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v0.24.0/gec
2222
RUN wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb \
2323
&& dpkg -i google-chrome*.deb \
2424
&& rm google-chrome*.deb \
25-
&& wget -q https://chromedriver.storage.googleapis.com/89.0.4389.23/chromedriver_linux64.zip \
25+
&& CHROME_MAJOR_VERSION=$(google-chrome --version | sed 's/.* \([0-9]\+\)\..*/\1/') \
26+
&& CHROME_DRIVER_FILE=$(wget -q -O - https://chromedriver.storage.googleapis.com/ | sed "s,.*<Key>\($CHROME_MAJOR_VERSION\.[0-9.]*/chromedriver_linux64.zip\)</Key>.*,\1,g") \
27+
&& wget -q "https://chromedriver.storage.googleapis.com/$CHROME_DRIVER_FILE" \
2628
&& unzip chromedriver_linux64.zip \
2729
&& rm chromedriver_linux64.zip \
2830
&& mv chromedriver /usr/local/bin \

0 commit comments

Comments
 (0)