Skip to content

Commit

Permalink
Updating chrome and Firefox installs
Browse files Browse the repository at this point in the history
  • Loading branch information
Gordonei committed Mar 11, 2024
1 parent bc1551b commit 125a3f7
Showing 1 changed file with 35 additions and 24 deletions.
59 changes: 35 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,47 @@ USER root
RUN pip install authlib

# For alerts and reports
ARG CHROME_VERSION=109.0.5414.119-1

RUN apt-get update && \
apt-get install -y wget && \
wget -q https://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb && \
apt-get install -y --no-install-recommends ./google-chrome-stable_${CHROME_VERSION}_amd64.deb && \
rm -f google-chrome-stable_${CHROME_VERSION}_amd64.deb && \
apt-get install -y redis-server && \
export CHROMEDRIVER_VERSION=$(curl --silent https://chromedriver.storage.googleapis.com/LATEST_RELEASE_109) && \
wget -q https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip && \
unzip chromedriver_linux64.zip -d /usr/bin && \
chmod 755 /usr/bin/chromedriver && \
rm -f chromedriver_linux64.zip
apt-get install -y redis-server

# installing google-chrome-stable
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 | \
gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/google.gpg --import; \
chmod 644 /etc/apt/trusted.gpg.d/google.gpg; \
echo "deb https://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;

ARG GECKODRIVER_VERSION=v0.28.0
ARG FIREFOX_VERSION=88.0
# installing chromedriver that corresponds to chrome
RUN CHROMEDRIVER_VERSION=$(curl https://googlechromelabs.github.io/chrome-for-testing/LATEST_RELEASE_STABLE); \
wget -N https://storage.googleapis.com/chrome-for-testing-public/$CHROMEDRIVER_VERSION/linux64/chromedriver-linux64.zip -P ~/ && \
unzip ~/chromedriver-linux64.zip -d ~/ && \
rm ~/chromedriver-linux64.zip && \
mv -f ~/chromedriver-linux64/chromedriver /usr/bin/chromedriver && \
rm -rf ~/chromedriver-linux64

ARG GECKODRIVER_VERSION=v0.33.0
ARG FIREFOX_VERSION=117.0.1

RUN apt-get update -y \
&& apt-get install -y --no-install-recommends libnss3 libdbus-glib-1-2 libgtk-3-0 libx11-xcb1

# geckodriver
RUN wget https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz -O /tmp/geckodriver.tar.gz && \
tar xvfz /tmp/geckodriver.tar.gz -C /tmp && \
mv /tmp/geckodriver /usr/local/bin/geckodriver && \
rm /tmp/geckodriver.tar.gz

# Install Firefox
RUN wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2 -O /opt/firefox.tar.bz2 && \
tar xvf /opt/firefox.tar.bz2 -C /opt && \
ln -s /opt/firefox/firefox /usr/local/bin/firefox
RUN apt-get update -qq \
&& apt-get install -yqq --no-install-recommends \
libnss3 \
libdbus-glib-1-2 \
libgtk-3-0 \
libx11-xcb1 \
libasound2 \
libxtst6 \
wget \
# Install GeckoDriver WebDriver
&& wget -q https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz -O - | tar xfz - -C /usr/local/bin \
# Install Firefox
&& wget -q https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2 -O - | tar xfj - -C /opt \
&& ln -s /opt/firefox/firefox /usr/local/bin/firefox \
&& apt-get autoremove -yqq --purge wget && rm -rf /var/[log,tmp]/* /tmp/* /var/lib/apt/lists/*

# Install base drivers required for helm chart to work
RUN pip install gevent \
Expand Down

0 comments on commit 125a3f7

Please sign in to comment.