forked from ppodgorsek/docker-robot-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ppodgorsek#400 from ppodgorsek/issue-386
Issue ppodgorsek#386 - Upgrade the Robot Framework Browser library to version 12.2.0
- Loading branch information
Showing
5 changed files
with
72 additions
and
78 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*~ | ||
|
||
.git/ | ||
.github/ | ||
test/ | ||
|
||
.gitignore | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM python:3.9.12-alpine3.15 | ||
FROM fedora:36 | ||
|
||
MAINTAINER Paul Podgorsek <[email protected]> | ||
LABEL description Robot Framework in Docker. | ||
|
@@ -38,7 +38,7 @@ ENV DATABASE_LIBRARY_VERSION 1.2.4 | |
ENV DATADRIVER_VERSION 1.6.0 | ||
ENV DATETIMETZ_VERSION 1.0.6 | ||
ENV FAKER_VERSION 5.0.0 | ||
ENV FIREFOX_VERSION 91.7 | ||
ENV FIREFOX_VERSION 98.0 | ||
ENV FTP_LIBRARY_VERSION 1.9 | ||
ENV GECKO_DRIVER_VERSION v0.30.0 | ||
ENV IMAP_LIBRARY_VERSION 0.4.2 | ||
|
@@ -58,81 +58,62 @@ COPY bin/chromium-browser.sh /opt/robotframework/bin/chromium-browser | |
COPY bin/run-tests-in-virtual-screen.sh /opt/robotframework/bin/ | ||
|
||
# Install system dependencies | ||
RUN apk update \ | ||
&& apk --no-cache upgrade \ | ||
&& apk --no-cache --virtual .build-deps add \ | ||
|
||
# Install dependencies for cryptography due to https://github.com/pyca/cryptography/issues/5771 | ||
cargo \ | ||
rust \ | ||
|
||
# Continue with system dependencies | ||
gcc \ | ||
g++ \ | ||
libffi-dev \ | ||
linux-headers \ | ||
make \ | ||
musl-dev \ | ||
openssl-dev \ | ||
which \ | ||
wget \ | ||
&& apk --no-cache add \ | ||
"chromium~$CHROMIUM_VERSION" \ | ||
"chromium-chromedriver~$CHROMIUM_VERSION" \ | ||
"firefox-esr~$FIREFOX_VERSION" \ | ||
RUN dnf upgrade -y --refresh \ | ||
&& dnf install -y \ | ||
chromedriver-${CHROMIUM_VERSION}* \ | ||
chromium-${CHROMIUM_VERSION}* \ | ||
firefox-${FIREFOX_VERSION}* \ | ||
npm \ | ||
nodejs \ | ||
xauth \ | ||
python3-pip \ | ||
tzdata \ | ||
"xvfb-run~$XVFB_VERSION" \ | ||
&& mv /usr/lib/chromium/chrome /usr/lib/chromium/chrome-original \ | ||
&& ln -sfv /opt/robotframework/bin/chromium-browser /usr/lib/chromium/chrome \ | ||
# FIXME: above is a workaround, as the path is ignored | ||
|
||
# Install Robot Framework and Selenium Library | ||
&& pip3 install \ | ||
--no-cache-dir \ | ||
robotframework==$ROBOT_FRAMEWORK_VERSION \ | ||
robotframework-browser==$BROWSER_LIBRARY_VERSION \ | ||
robotframework-databaselibrary==$DATABASE_LIBRARY_VERSION \ | ||
robotframework-datadriver==$DATADRIVER_VERSION \ | ||
robotframework-datadriver[XLS] \ | ||
robotframework-datetime-tz==$DATETIMETZ_VERSION \ | ||
robotframework-faker==$FAKER_VERSION \ | ||
robotframework-ftplibrary==$FTP_LIBRARY_VERSION \ | ||
robotframework-imaplibrary2==$IMAP_LIBRARY_VERSION \ | ||
robotframework-pabot==$PABOT_VERSION \ | ||
robotframework-requests==$REQUESTS_VERSION \ | ||
robotframework-seleniumlibrary==$SELENIUM_LIBRARY_VERSION \ | ||
robotframework-sshlibrary==$SSH_LIBRARY_VERSION \ | ||
axe-selenium-python==$AXE_SELENIUM_LIBRARY_VERSION \ | ||
PyYAML \ | ||
|
||
# Install awscli to be able to upload test reports to AWS S3 | ||
awscli==$AWS_CLI_VERSION \ | ||
|
||
# Install the node dependencies for the Browser library | ||
&& rfbrowser init \ | ||
|
||
# Download the glibc package for Alpine Linux from its GitHub repository | ||
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \ | ||
&& wget -q "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$ALPINE_GLIBC/glibc-$ALPINE_GLIBC.apk" \ | ||
&& wget -q "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$ALPINE_GLIBC/glibc-bin-$ALPINE_GLIBC.apk" \ | ||
&& apk add glibc-$ALPINE_GLIBC.apk \ | ||
&& apk add glibc-bin-$ALPINE_GLIBC.apk \ | ||
&& rm glibc-$ALPINE_GLIBC.apk \ | ||
&& rm glibc-bin-$ALPINE_GLIBC.apk \ | ||
&& rm /etc/apk/keys/sgerrand.rsa.pub \ | ||
|
||
# Download Gecko drivers directly from the GitHub repository | ||
xorg-x11-server-Xvfb-${XVFB_VERSION}* \ | ||
&& dnf clean all | ||
|
||
# FIXME: below is a workaround, as the path is ignored | ||
RUN mv /usr/lib64/chromium-browser/chromium-browser /usr/lib64/chromium-browser/chromium-browser-original \ | ||
&& ln -sfv /opt/robotframework/bin/chromium-browser /usr/lib64/chromium-browser/chromium-browser | ||
|
||
# Install Robot Framework and associated libraries | ||
RUN pip3 install \ | ||
--no-cache-dir \ | ||
robotframework==$ROBOT_FRAMEWORK_VERSION \ | ||
robotframework-browser==$BROWSER_LIBRARY_VERSION \ | ||
robotframework-databaselibrary==$DATABASE_LIBRARY_VERSION \ | ||
robotframework-datadriver==$DATADRIVER_VERSION \ | ||
robotframework-datadriver[XLS] \ | ||
robotframework-datetime-tz==$DATETIMETZ_VERSION \ | ||
robotframework-faker==$FAKER_VERSION \ | ||
robotframework-ftplibrary==$FTP_LIBRARY_VERSION \ | ||
robotframework-imaplibrary2==$IMAP_LIBRARY_VERSION \ | ||
robotframework-pabot==$PABOT_VERSION \ | ||
robotframework-requests==$REQUESTS_VERSION \ | ||
robotframework-seleniumlibrary==$SELENIUM_LIBRARY_VERSION \ | ||
robotframework-sshlibrary==$SSH_LIBRARY_VERSION \ | ||
axe-selenium-python==$AXE_SELENIUM_LIBRARY_VERSION \ | ||
PyYAML \ | ||
# Install awscli to be able to upload test reports to AWS S3 | ||
awscli==$AWS_CLI_VERSION | ||
|
||
# Gecko drivers | ||
RUN dnf install -y \ | ||
wget \ | ||
|
||
# Download Gecko drivers directly from the GitHub repository | ||
&& wget -q "https://github.com/mozilla/geckodriver/releases/download/$GECKO_DRIVER_VERSION/geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz" \ | ||
&& tar xzf geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \ | ||
&& mkdir -p /opt/robotframework/drivers/ \ | ||
&& mv geckodriver /opt/robotframework/drivers/geckodriver \ | ||
&& rm geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \ | ||
&& tar xzf geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \ | ||
&& mkdir -p /opt/robotframework/drivers/ \ | ||
&& mv geckodriver /opt/robotframework/drivers/geckodriver \ | ||
&& rm geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \ | ||
|
||
&& dnf remove -y \ | ||
wget \ | ||
&& dnf clean all | ||
|
||
# Clean up buildtime dependencies | ||
&& apk del --no-cache --update-cache .build-deps | ||
# Install the Node dependencies for the Browser library | ||
# FIXME: Playright currently doesn't support relying on system browsers, which is why the `--skip-browsers` parameter cannot be used here. | ||
RUN rfbrowser init \ | ||
&& ln -sf /usr/lib64/libstdc++.so.6 /usr/local/lib/python3.10/site-packages/Browser/wrapper/node_modules/playwright-core/.local-browsers/firefox-1316/firefox/libstdc++.so.6 | ||
|
||
# Create the default report and work folders with the default user to avoid runtime issues | ||
# These folders are writeable by anyone, to ensure the user can be changed on the command line. | ||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/sh | ||
|
||
exec /usr/lib/chromium/chrome-original --disable-gpu --no-sandbox "$@" | ||
exec /usr/lib64/chromium-browser/chromium-browser-original --disable-gpu --no-sandbox "$@" |
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