2023-12-09 02:59:35 +01:00
|
|
|
FROM ubuntu:22.04
|
|
|
|
|
|
|
|
RUN \
|
|
|
|
apt-get update && \
|
|
|
|
\
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt-get -y install \
|
|
|
|
libicu70 \
|
|
|
|
libncurses5 \
|
|
|
|
libtommath1 \
|
|
|
|
python3 \
|
|
|
|
python3-pip \
|
2024-04-21 01:31:19 +02:00
|
|
|
python3-venv \
|
2023-12-09 02:59:35 +01:00
|
|
|
sudo && \
|
|
|
|
\
|
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
\
|
|
|
|
ln -s /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0
|
|
|
|
|
|
|
|
ARG UID=1000
|
|
|
|
|
2024-04-21 01:31:19 +02:00
|
|
|
COPY pyproject.toml /qa-run/
|
2023-12-09 02:59:35 +01:00
|
|
|
|
|
|
|
RUN \
|
2024-04-21 01:31:19 +02:00
|
|
|
useradd -m -u $UID user -G sudo && \
|
2023-12-09 02:59:35 +01:00
|
|
|
groupadd firebird && \
|
|
|
|
useradd --non-unique -M -b /opt -s /sbin/nologin -g firebird -u $UID firebird && \
|
|
|
|
usermod -G sudo firebird && \
|
|
|
|
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
|
|
|
|
\
|
|
|
|
mkdir /qa-out && \
|
|
|
|
chown -R user:user /qa-out && \
|
|
|
|
chown -R firebird:firebird /qa-run && \
|
|
|
|
cd /qa-run && \
|
2024-04-21 01:31:19 +02:00
|
|
|
ln -s /qa-out out && \
|
|
|
|
python3 -m pip install pipx
|
2023-12-09 02:59:35 +01:00
|
|
|
|
|
|
|
USER user
|
|
|
|
|
2024-04-21 01:31:19 +02:00
|
|
|
RUN \
|
|
|
|
cd /qa-run && \
|
|
|
|
pipx ensurepath && \
|
|
|
|
pipx install --preinstall pytest-md-report --preinstall pytest-timeout --include-deps firebird-qa
|
|
|
|
|
|
|
|
ENV PATH=/opt/firebird/bin:/home/user/.local/bin:$PATH
|
2023-12-09 02:59:35 +01:00
|
|
|
ENV TERMINFO_DIRS=/lib/terminfo
|
|
|
|
ENV LD_LIBRARY_PATH=/opt/firebird/lib
|
|
|
|
|
2023-12-21 12:35:31 +01:00
|
|
|
ENTRYPOINT ["/qa/docker/run.sh"]
|