Skip to content

Commit 9abad60

Browse files
bjoernricksnichtsfrei
authored andcommitted
Fix: Fix building container image on Debian bookworm
With Debian 12 (bookworm) it isn't possible to use pip to install Python packages system wide because auf [PEP 668](https://peps.python.org/pep-0668). Therefore it requires the `--break-system-packages` switch or to use a virtual environment.
1 parent 3a700b7 commit 9abad60

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.docker/prod.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ RUN apt-get update && \
1919
apt-get remove --purge --auto-remove -y && \
2020
rm -rf /var/lib/apt/lists/*
2121

22-
RUN python -m pip install --upgrade pip && \
23-
python3 -m pip install poetry
22+
RUN python3 -m pip install --upgrade --break-system-packages pip && \
23+
python3 -m pip install --break-system-packages poetry
2424

2525
RUN rm -rf dist && poetry build -f wheel
2626

@@ -64,7 +64,7 @@ RUN mkdir -p /run/ospd && \
6464

6565
COPY --from=builder /source/dist/* /ospd-openvas/
6666

67-
RUN python3 -m pip install /ospd-openvas/*
67+
RUN python3 -m pip install --break-system-packages /ospd-openvas/*
6868

6969
RUN apt-get purge -y gcc python3-dev && apt-get autoremove -y
7070

0 commit comments

Comments
 (0)