Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanpaulrsoucy committed Sep 15, 2023
1 parent 32d64cb commit c48ae00
Showing 1 changed file with 23 additions and 9 deletions.
32 changes: 23 additions & 9 deletions docker/ccodwg-archive/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
FROM python:latest

# add Google Chrome repository
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'

# install Google Chrome and other required packages
# install required packages
RUN apt-get -y update && apt-get install -y \
google-chrome-stable \
git \
unzip
unzip \
xvfb libxi6 libgconf-2-4 jq libjq1 libonig5 libxkbcommon0 libxss1 libglib2.0-0 libnss3 \
libfontconfig1 libatk-bridge2.0-0 libatspi2.0-0 libgtk-3-0 libpango-1.0-0 libgdk-pixbuf2.0-0 libxcomposite1 \
libxcursor1 libxdamage1 libxtst6 libappindicator3-1 libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libxfixes3 \
libdbus-1-3 libexpat1 libgcc1 libnspr4 libgbm1 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxext6 \
libxrandr2 libxrender1 gconf-service ca-certificates fonts-liberation libappindicator1 lsb-release xdg-utils

# download and install Google Chrome
RUN LATEST_CHROME_RELEASE=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq '.channels.Stable') && \
LATEST_CHROME_URL=$(echo "$LATEST_CHROME_RELEASE" | jq -r '.downloads.chrome[] | select(.platform == "linux64") | .url') && \
wget -N "$LATEST_CHROME_URL" -P ~/ && \
unzip ~/chrome-linux64.zip -d ~/ && \
mv ~/chrome-linux64 ~/chrome && \
ln -s ~/chrome/chrome /usr/local/bin/chrome && \
chmod +x ~/chrome && \
rm ~/chrome-linux64.zip

# download and unzip Chromedriver
RUN export URL=$(python -c "import urllib.request, json; response = urllib.request.urlopen('https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json'); data = json.loads(response.read()); print(data['channels']['Stable']['downloads']['chromedriver'][0]['url'])") && wget -O /tmp/chromedriver.zip $URL
RUN unzip -j /tmp/chromedriver.zip chromedriver-linux64/chromedriver -d /usr/local/bin/
RUN LATEST_CHROME_RELEASE=$(curl -s https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions-with-downloads.json | jq '.channels.Stable') && \
LATEST_CHROMEDRIVER_URL=$(echo "$LATEST_CHROME_RELEASE" | jq -r '.downloads.chromedriver[] | select(.platform == "linux64") | .url') && \
wget -O ~/chromedriver.zip $LATEST_CHROMEDRIVER_URL && \
unzip -j ~/chromedriver.zip chromedriver-linux64/chromedriver -d /usr/local/bin/ && \
chmod +x /usr/local/bin/chromedriver && \
rm ~/chromedriver.zip

# set display port environmental variable
ENV DISPLAY=:99
Expand Down

0 comments on commit c48ae00

Please sign in to comment.