1- FROM python:3.9.12-alpine3.15
1+ FROM fedora:36
22
33MAINTAINER Paul Podgorsek <
[email protected] >
44LABEL description Robot Framework in Docker.
@@ -38,7 +38,7 @@ ENV DATABASE_LIBRARY_VERSION 1.2.4
3838ENV DATADRIVER_VERSION 1.6.0
3939ENV DATETIMETZ_VERSION 1.0.6
4040ENV FAKER_VERSION 5.0.0
41- ENV FIREFOX_VERSION 91.7
41+ ENV FIREFOX_VERSION 98.0
4242ENV FTP_LIBRARY_VERSION 1.9
4343ENV GECKO_DRIVER_VERSION v0.30.0
4444ENV IMAP_LIBRARY_VERSION 0.4.2
@@ -58,81 +58,62 @@ COPY bin/chromium-browser.sh /opt/robotframework/bin/chromium-browser
5858COPY bin/run-tests-in-virtual-screen.sh /opt/robotframework/bin/
5959
6060# Install system dependencies
61- RUN apk update \
62- && apk --no-cache upgrade \
63- && apk --no-cache --virtual .build-deps add \
64-
65- # Install dependencies for cryptography due to https://github.com/pyca/cryptography/issues/5771
66- cargo \
67- rust \
68-
69- # Continue with system dependencies
70- gcc \
71- g++ \
72- libffi-dev \
73- linux-headers \
74- make \
75- musl-dev \
76- openssl-dev \
77- which \
78- wget \
79- && apk --no-cache add \
80- "chromium~$CHROMIUM_VERSION" \
81- "chromium-chromedriver~$CHROMIUM_VERSION" \
82- "firefox-esr~$FIREFOX_VERSION" \
61+ RUN dnf upgrade -y --refresh \
62+ && dnf install -y \
63+ chromedriver-${CHROMIUM_VERSION}* \
64+ chromium-${CHROMIUM_VERSION}* \
65+ firefox-${FIREFOX_VERSION}* \
8366 npm \
8467 nodejs \
85- xauth \
68+ python3-pip \
8669 tzdata \
87- "xvfb-run~$XVFB_VERSION" \
88- && mv /usr/lib/chromium/chrome /usr/lib/chromium/chrome-original \
89- && ln -sfv /opt/robotframework/bin/chromium-browser /usr/lib/chromium/chrome \
90- # FIXME: above is a workaround, as the path is ignored
91-
92- # Install Robot Framework and Selenium Library
93- && pip3 install \
94- --no-cache-dir \
95- robotframework==$ROBOT_FRAMEWORK_VERSION \
96- robotframework-browser==$BROWSER_LIBRARY_VERSION \
97- robotframework-databaselibrary==$DATABASE_LIBRARY_VERSION \
98- robotframework-datadriver==$DATADRIVER_VERSION \
99- robotframework-datadriver[XLS] \
100- robotframework-datetime-tz==$DATETIMETZ_VERSION \
101- robotframework-faker==$FAKER_VERSION \
102- robotframework-ftplibrary==$FTP_LIBRARY_VERSION \
103- robotframework-imaplibrary2==$IMAP_LIBRARY_VERSION \
104- robotframework-pabot==$PABOT_VERSION \
105- robotframework-requests==$REQUESTS_VERSION \
106- robotframework-seleniumlibrary==$SELENIUM_LIBRARY_VERSION \
107- robotframework-sshlibrary==$SSH_LIBRARY_VERSION \
108- axe-selenium-python==$AXE_SELENIUM_LIBRARY_VERSION \
109- PyYAML \
110-
111- # Install awscli to be able to upload test reports to AWS S3
112- awscli==$AWS_CLI_VERSION \
113-
114- # Install the node dependencies for the Browser library
115- && rfbrowser init \
116-
117- # Download the glibc package for Alpine Linux from its GitHub repository
118- && wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
119- && wget -q "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$ALPINE_GLIBC/glibc-$ALPINE_GLIBC.apk" \
120- && wget -q "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/$ALPINE_GLIBC/glibc-bin-$ALPINE_GLIBC.apk" \
121- && apk add glibc-$ALPINE_GLIBC.apk \
122- && apk add glibc-bin-$ALPINE_GLIBC.apk \
123- && rm glibc-$ALPINE_GLIBC.apk \
124- && rm glibc-bin-$ALPINE_GLIBC.apk \
125- && rm /etc/apk/keys/sgerrand.rsa.pub \
126-
127- # Download Gecko drivers directly from the GitHub repository
70+ xorg-x11-server-Xvfb-${XVFB_VERSION}* \
71+ && dnf clean all
72+
73+ # FIXME: below is a workaround, as the path is ignored
74+ RUN mv /usr/lib64/chromium-browser/chromium-browser /usr/lib64/chromium-browser/chromium-browser-original \
75+ && ln -sfv /opt/robotframework/bin/chromium-browser /usr/lib64/chromium-browser/chromium-browser
76+
77+ # Install Robot Framework and associated libraries
78+ RUN pip3 install \
79+ --no-cache-dir \
80+ robotframework==$ROBOT_FRAMEWORK_VERSION \
81+ robotframework-browser==$BROWSER_LIBRARY_VERSION \
82+ robotframework-databaselibrary==$DATABASE_LIBRARY_VERSION \
83+ robotframework-datadriver==$DATADRIVER_VERSION \
84+ robotframework-datadriver[XLS] \
85+ robotframework-datetime-tz==$DATETIMETZ_VERSION \
86+ robotframework-faker==$FAKER_VERSION \
87+ robotframework-ftplibrary==$FTP_LIBRARY_VERSION \
88+ robotframework-imaplibrary2==$IMAP_LIBRARY_VERSION \
89+ robotframework-pabot==$PABOT_VERSION \
90+ robotframework-requests==$REQUESTS_VERSION \
91+ robotframework-seleniumlibrary==$SELENIUM_LIBRARY_VERSION \
92+ robotframework-sshlibrary==$SSH_LIBRARY_VERSION \
93+ axe-selenium-python==$AXE_SELENIUM_LIBRARY_VERSION \
94+ PyYAML \
95+ # Install awscli to be able to upload test reports to AWS S3
96+ awscli==$AWS_CLI_VERSION
97+
98+ # Gecko drivers
99+ RUN dnf install -y \
100+ wget \
101+
102+ # Download Gecko drivers directly from the GitHub repository
128103 && wget -q "https://github.com/mozilla/geckodriver/releases/download/$GECKO_DRIVER_VERSION/geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz" \
129- && tar xzf geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \
130- && mkdir -p /opt/robotframework/drivers/ \
131- && mv geckodriver /opt/robotframework/drivers/geckodriver \
132- && rm geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \
104+ && tar xzf geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \
105+ && mkdir -p /opt/robotframework/drivers/ \
106+ && mv geckodriver /opt/robotframework/drivers/geckodriver \
107+ && rm geckodriver-$GECKO_DRIVER_VERSION-linux64.tar.gz \
108+
109+ && dnf remove -y \
110+ wget \
111+ && dnf clean all
133112
134- # Clean up buildtime dependencies
135- && apk del --no-cache --update-cache .build-deps
113+ # Install the Node dependencies for the Browser library
114+ # FIXME: Playright currently doesn't support relying on system browsers, which is why the `--skip-browsers` parameter cannot be used here.
115+ RUN rfbrowser init \
116+ && 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
136117
137118# Create the default report and work folders with the default user to avoid runtime issues
138119# These folders are writeable by anyone, to ensure the user can be changed on the command line.
0 commit comments