Skip to content

Commit

Permalink
Fix: Fix building container image on Debian bookworm
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bjoernricks authored and nichtsfrei committed Jul 10, 2023
1 parent 3a700b7 commit 9abad60
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ RUN apt-get update && \
apt-get remove --purge --auto-remove -y && \
rm -rf /var/lib/apt/lists/*

RUN python -m pip install --upgrade pip && \
python3 -m pip install poetry
RUN python3 -m pip install --upgrade --break-system-packages pip && \
python3 -m pip install --break-system-packages poetry

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

Expand Down Expand Up @@ -64,7 +64,7 @@ RUN mkdir -p /run/ospd && \

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

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

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

Expand Down

0 comments on commit 9abad60

Please sign in to comment.