-
-
Save danilsmirnov/7358aa06e63f00fe82ff44f4aa2eeb31 to your computer and use it in GitHub Desktop.
Dockerfile with 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
# See https://codeship.com/documentation/docker/browser-testing/ | |
FROM python:3.9 | |
RUN apt-get update -y | |
# We need wget to set up the PPA and xvfb to have a virtual screen and unzip to install the Chromedriver | |
RUN apt-get install -y wget xvfb unzip | |
RUN 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 && \ | |
cp /chromedriver/chromedriver /usr/bin/chromedriver |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
need to test this way