qutebrowser/scripts/dev/ci/docker/Dockerfile.j2

53 lines
1.4 KiB
Django/Jinja

FROM archlinux:latest
RUN pacman-key --init && pacman-key --populate
{% if unstable %}
RUN sed -i '/^# after the header/a[kde-unstable]\nInclude = /etc/pacman.d/mirrorlist\n\n[core-testing]\nInclude = /etc/pacman.d/mirrorlist\n\n[extra-testing]\nInclude = /etc/pacman.d/mirrorlist' /etc/pacman.conf
{% endif %}
RUN pacman -Sy --noconfirm archlinux-keyring
RUN pacman -Su --noconfirm \
git \
python-tox \
python-distlib \
libxml2-legacy \
{% if qt6 %}
qt6-base \
qt6-declarative \
qt6-webengine \
python-pyqt6-webengine \
pdfjs \
python-pyqt6 \
{% else %}
qt5-base \
qt5-declarative \
openssl-1.1 \
qt5-webengine \
python-pyqtwebengine \
python-pyqt5 \
{% endif %}
xorg-xinit \
xorg-server-xvfb \
ttf-bitstream-vera \
gcc \
libyaml \
xorg-xdpyinfo
RUN useradd user -u 1001 && \
mkdir /home/user && \
chown user:users /home/user
{% if qt6 %}
{% set pyqt_module = 'PyQt6' %}
{% else %}
{% set pyqt_module = 'PyQt5' %}
{% endif %}
RUN python3 -c "from {{ pyqt_module }} import QtWebEngineCore, QtWebEngineWidgets"
USER user
WORKDIR /home/user
RUN git config --global --add safe.directory /outside/.git
CMD git clone /outside qutebrowser.git && \
cd qutebrowser.git && \
{{ python }} -m tox -e {% if qt6 %}py-qt6{% else %}py-qt5{% endif %}