Created
June 12, 2020 05:03
-
-
Save JoaRiski/3d7862251431952f6fe0c32da341910e to your computer and use it in GitHub Desktop.
Install google chrome version matching chromedriver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RUN apt-get update && \ | |
apt-get install -y gnupg wget curl unzip --no-install-recommends && \ | |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \ | |
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list && \ | |
apt-get update -y && \ | |
apt-get install -y google-chrome-stable && \ | |
CHROMEVER=$(google-chrome --product-version | grep -o "[^\.]*\.[^\.]*\.[^\.]*") && \ | |
DRIVERVER=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROMEVER") && \ | |
wget -q --continue -P /chromedriver "http://chromedriver.storage.googleapis.com/$DRIVERVER/chromedriver_linux64.zip" && \ | |
unzip /chromedriver/chromedriver* -d /chromedriver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment