Skip to content

Commit f2b95bd

Browse files
committed
2 parents f3f53ad + 52bf714 commit f2b95bd

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

Dockerfile

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ RUN \
99
libtommath1 \
1010
python3 \
1111
python3-pip \
12+
python3-venv \
1213
sudo && \
1314
\
1415
rm -rf /var/lib/apt/lists/* && \
@@ -17,10 +18,10 @@ RUN \
1718

1819
ARG UID=1000
1920

20-
COPY setup.cfg pyproject.toml /qa-run/
21+
COPY pyproject.toml /qa-run/
2122

2223
RUN \
23-
useradd -u $UID user -G sudo && \
24+
useradd -m -u $UID user -G sudo && \
2425
groupadd firebird && \
2526
useradd --non-unique -M -b /opt -s /sbin/nologin -g firebird -u $UID firebird && \
2627
usermod -G sudo firebird && \
@@ -30,12 +31,17 @@ RUN \
3031
chown -R user:user /qa-out && \
3132
chown -R firebird:firebird /qa-run && \
3233
cd /qa-run && \
33-
pip install -e . && \
34-
pip install pytest-md-report pytest-timeout
34+
ln -s /qa-out out && \
35+
python3 -m pip install pipx
3536

3637
USER user
3738

38-
ENV PATH=/opt/firebird/bin:$PATH
39+
RUN \
40+
cd /qa-run && \
41+
pipx ensurepath && \
42+
pipx install --preinstall pytest-md-report --preinstall pytest-timeout --include-deps firebird-qa
43+
44+
ENV PATH=/opt/firebird/bin:/home/user/.local/bin:$PATH
3945
ENV TERMINFO_DIRS=/lib/terminfo
4046
ENV LD_LIBRARY_PATH=/opt/firebird/lib
4147

docker/setup.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
set -e
3+
shopt -s extglob
34

45
mkdir /tmp/firebird-installer
56
cd /tmp/firebird-installer
@@ -68,4 +69,4 @@ rm -r /tmp/firebird-installer
6869
mkdir /opt/firebird/examples/empbuild/qa
6970
chmod -R 777 /opt/firebird/examples/empbuild
7071

71-
cp -rn /qa/* /qa-run/
72+
cp -rn /qa/!(out) /qa-run/

run-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ fi
2222

2323
docker build --build-arg UID=$(id -u) --build-arg GID=$(id -g) --progress=plain -t firebird-qa $THIS_DIR
2424
mkdir -p $FBQA_OUT/tests
25-
docker run --user $(id -u) --rm -v `realpath $FBQA_OUT`:/qa-out -v `realpath $FBQA_OUT/tests`:/qa-run/out/tests -v `realpath $THIS_DIR`:/qa -v `realpath $FBQA_INSTALLER`:/firebird-installer.tar.gz firebird-qa "$@"
25+
docker run --user $(id -u) --rm -v `realpath $FBQA_OUT`:/qa-out -v `realpath $THIS_DIR`:/qa -v `realpath $FBQA_INSTALLER`:/firebird-installer.tar.gz firebird-qa "$@"

0 commit comments

Comments
 (0)