Skip to content

Commit

Permalink
compatify dockerfile (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand authored Nov 26, 2023
1 parent 0a0f304 commit d92c6fb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
56 changes: 28 additions & 28 deletions test/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,47 @@ RUN $INSTALL wget ca-certificates bzip2 unzip
# firefox setup
RUN $INSTALL libgtk-3-0 libasound2 libx11-xcb1

RUN wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2
RUN tar -xf firefox-${FIREFOX_VERSION}.tar.bz2
RUN mv firefox /usr/local/share
RUN ln -s /usr/local/share/firefox/firefox /usr/local/bin
RUN rm firefox-${FIREFOX_VERSION}.tar.bz2
RUN wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2 && \
tar -xf firefox-${FIREFOX_VERSION}.tar.bz2 && \
mv firefox /usr/local/share && \
ln -s /usr/local/share/firefox/firefox /usr/local/bin && \
rm firefox-${FIREFOX_VERSION}.tar.bz2

RUN firefox --version

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

RUN geckodriver --version

# chrome setup
RUN wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb
RUN $INSTALL ./google-chrome-stable_${CHROME_VERSION}_amd64.deb
RUN rm google-chrome-stable_${CHROME_VERSION}_amd64.deb
RUN wget https://dl.google.com/linux/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb && \
$INSTALL ./google-chrome-stable_${CHROME_VERSION}_amd64.deb && \
rm google-chrome-stable_${CHROME_VERSION}_amd64.deb

RUN google-chrome --version

# chromedirver setup
RUN wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip
RUN unzip chromedriver-linux64.zip
RUN mv chromedriver-linux64/chromedriver /usr/local/bin
RUN rm -rf chromedriver-linux64
RUN rm chromedriver-linux64.zip
RUN wget https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/${CHROMEDRIVER_VERSION}/linux64/chromedriver-linux64.zip && \
unzip chromedriver-linux64.zip && \
mv chromedriver-linux64/chromedriver /usr/local/bin && \
rm -rf chromedriver-linux64 && \
rm chromedriver-linux64.zip

RUN geckodriver --version

# phantomjs setup
RUN $INSTALL build-essential chrpath libssl-dev libxft-dev
RUN $INSTALL libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev
RUN $INSTALL build-essential chrpath libssl-dev libxft-dev \
libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev

RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2
RUN tar -xf phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2
RUN mv phantomjs-${PHANTOMJS_VERSION}-linux-x86_64/bin/phantomjs /usr/local/bin
RUN rm -rf phantomjs-${PHANTOMJS_VERSION}-linux-x86_64
RUN rm phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2
RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2 && \
tar -xf phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2 && \
mv phantomjs-${PHANTOMJS_VERSION}-linux-x86_64/bin/phantomjs /usr/local/bin && \
rm -rf phantomjs-${PHANTOMJS_VERSION}-linux-x86_64 && \
rm phantomjs-${PHANTOMJS_VERSION}-linux-x86_64.tar.bz2

# fix weird phantomjs issue
ENV OPENSSL_CONF=/etc/ssl
Expand All @@ -65,7 +65,7 @@ RUN phantomjs --version

# install python dependencies
ADD requirements.txt .
RUN $INSTALL python3 python3-pip
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN rm requirements.txt
RUN $INSTALL python3 python3-pip && \
pip install --upgrade pip && \
pip install -r requirements.txt && \
rm requirements.txt
2 changes: 1 addition & 1 deletion test/docker/compare_output_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ DRIVER="firefox"
docker run -ti \
-v $(pwd):/repo \
-p 5000:5000 \
ghcr.io/opendocument-app/odr_core_test:sha-f9aab98 \
ghcr.io/opendocument-app/odr_core_test:sha-34851f1 \
python3 /repo/test/scripts/compare_output_server.py /repo/$REF /repo/$OBS --compare --driver $DRIVER

0 comments on commit d92c6fb

Please sign in to comment.