Created
September 18, 2020 08:04
-
-
Save seleniumgists/67a66a7dad5e05f3a9e12edc95430377 to your computer and use it in GitHub Desktop.
generated automatically from #selenium on seleniumhq slack
This file contains hidden or 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
#Step 0: Choose base | |
FROM maven:3.6.3-jdk-11 | |
#Step 1 : Install the pre-requisite | |
COPY . . | |
RUN apt-get update && apt install sudo | |
RUN apt-get install -y curl | |
RUN apt-get install -y p7zip \ | |
p7zip-full \ | |
unace \ | |
zip \ | |
unzip \ | |
bzip2 | |
#Version numbers | |
ARG FIREFOX_VERSION=80.0.1 | |
ARG CHROME_VERSION=85.0.4183.102-1 | |
ARG CHROME_DRIVER_VERSION=85.0.4183.87 | |
ARG FIREFOXDRIVER_VERSION=0.27.0 | |
#Step 4 : Install firefox | |
RUN wget --no-verbose -O /tmp/firefox.tar.bz2 <https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2> \ | |
&& bunzip2 /tmp/firefox.tar.bz2 \ | |
&& tar xvf /tmp/firefox.tar \ | |
&& mv /firefox /opt/firefox-$FIREFOX_VERSION \ | |
&& ln -s /opt/firefox-$FIREFOX_VERSION/firefox /usr/bin/firefox | |
#Step 5: Install Geckodriver | |
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz <https://github.com/mozilla/geckodriver/releases/download/v$FIREFOXDRIVER_VERSION/geckodriver-v$FIREFOXDRIVER_VERSION-linux64.tar.gz> \ | |
&& rm -rf /opt/geckodriver \ | |
&& tar -C /opt -zxf /tmp/geckodriver.tar.gz \ | |
&& rm /tmp/geckodriver.tar.gz \ | |
&& mv /opt/geckodriver /opt/geckodriver-$FIREFOXDRIVER_VERSION \ | |
&& chmod 755 /opt/geckodriver-$FIREFOXDRIVER_VERSION \ | |
&& ln -fs /opt/geckodriver-$FIREFOXDRIVER_VERSION /usr/bin/geckodriver \ | |
&& ln -fs /opt/geckodriver-$FIREFOXDRIVER_VERSION /usr/bin/wires | |
#Step 7: Copy our project | |
COPY . /app | |
#Making our working directory as /app | |
WORKDIR /app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment