|
|
|
@@ -1,29 +1,22 @@
|
|
|
|
|
FROM python:3
|
|
|
|
|
FROM python:3.12-slim-bullseye
|
|
|
|
|
|
|
|
|
|
LABEL maintainer="Joakim Olsson <joakim@unbound.se>"
|
|
|
|
|
LABEL description="Base image for running Robot Framework test suites in Docker. \
|
|
|
|
|
\
|
|
|
|
|
The image cotains the following Robot Framework libraries:\
|
|
|
|
|
- Appium library - Keywords for Android & IOS device UI tests \
|
|
|
|
|
- Database library - Keywords for SQL queries & statements \
|
|
|
|
|
- HTTP library - Keywords for HTTP & Rest \
|
|
|
|
|
- RabbitMQ library - Keywords for Rabbit MQ \
|
|
|
|
|
- Selenium2 library - Keywords for cross browser tests\
|
|
|
|
|
\
|
|
|
|
|
Drivers:\
|
|
|
|
|
- psycopg2 - Python driver for Postgres \
|
|
|
|
|
- PyMySQL - Python driver for MySQL"
|
|
|
|
|
ARG TARGETOS
|
|
|
|
|
ARG TARGETARCH
|
|
|
|
|
ARG GECKODRIVER_VERSION=0.32.0
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && \
|
|
|
|
|
apt-get -y install jq firefox-esr && \
|
|
|
|
|
rm -r /var/lib/apt/lists/* && \
|
|
|
|
|
pip install \
|
|
|
|
|
urllib3 \
|
|
|
|
|
psycopg2-binary \
|
|
|
|
|
PyMySQL \
|
|
|
|
|
robotframework==6.0.1 \
|
|
|
|
|
robotframework-appiumlibrary \
|
|
|
|
|
robotframework-databaselibrary \
|
|
|
|
|
robotframework-httplibrary \
|
|
|
|
|
-e "git+https://github.com/JakUi/robotframework-rabbitmq-fork#egg=robotframework-rabbitmq-ao" \
|
|
|
|
|
robotframework-selenium2library
|
|
|
|
|
RUN install -d -m 0755 /etc/apt/keyrings && \
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get -y install wget gnupg2 jq curl git fonts-liberation libdrm2 libgbm1 libnspr4 libnss3 libu2f-udev libvulkan1 xdg-utils && \
|
|
|
|
|
wget -q https://packages.mozilla.org/apt/repo-signing-key.gpg -O- | tee /etc/apt/keyrings/packages.mozilla.org.asc > /dev/null && \
|
|
|
|
|
gpg -n -q --import --import-options import-show /etc/apt/keyrings/packages.mozilla.org.asc | awk '/pub/{getline; gsub(/^ +| +$/,""); print "\n"$0"\n"}' && \
|
|
|
|
|
echo "deb [signed-by=/etc/apt/keyrings/packages.mozilla.org.asc] https://packages.mozilla.org/apt mozilla main" | tee -a /etc/apt/sources.list.d/mozilla.list > /dev/null && \
|
|
|
|
|
printf 'Package: *\nPin: origin packages.mozilla.org\nPin-Priority: 1000' >/etc/apt/preferences.d/mozilla && \
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get -y install firefox && \
|
|
|
|
|
wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
|
|
|
|
|
dpkg -i google-chrome-stable_current_amd64.deb && \
|
|
|
|
|
rm -r /var/lib/apt/lists/* google-chrome-stable_current_amd64.deb
|
|
|
|
|
|
|
|
|
|
COPY requirements.txt .
|
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt && \
|
|
|
|
|
rm requirements.txt
|
|
|
|
|