From de42fc1f8d2874e63b3e463afadb46866dd17da8 Mon Sep 17 00:00:00 2001 From: Pierre Kancir Date: Thu, 25 Jun 2026 15:14:43 +0200 Subject: [PATCH] docker: fix pip system install --- docker/Dockerfile_dev-base | 11 +++++------ docker/Dockerfile_dev-ros | 11 +++++------ 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/docker/Dockerfile_dev-base b/docker/Dockerfile_dev-base index e6c7c04..6e1b10e 100644 --- a/docker/Dockerfile_dev-base +++ b/docker/Dockerfile_dev-base @@ -39,7 +39,8 @@ RUN apt-get update \ ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ - PIP_DISABLE_PIP_VERSION_CHECK=on + PIP_DISABLE_PIP_VERSION_CHECK=on \ + PIP_BREAK_SYSTEM_PACKAGES=1 # TAKEN from https://github.com/docker-library/python/blob/a58630aef106c8efd710011c6a2a0a1d551319a0/3.11/bullseye/Dockerfile # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -62,14 +63,10 @@ RUN set -eux; \ --break-system-packages \ "pip==$PYTHON_PIP_VERSION" \ "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - wheel \ ; \ rm -f get-pip.py; \ \ - pip --version; \ - mkdir -p ~/.config/pip \ - && echo "[global]" >> ~/.config/pip/pip.conf \ - && echo "break-system-packages = true" >> ~/.config/pip/pip.conf + pip --version RUN python -m pip install --no-cache-dir -U wheel future lxml pexpect fastcrc flake8 pycodestyle empy==3.3.4 pyelftools tabulate pre-commit junitparser ptyprocess dronecan requests mock @@ -110,3 +107,5 @@ ENV TZ=UTC ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV PIP_DISABLE_PIP_VERSION_CHECK=on +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +ENV PIP_ROOT_USER_ACTION=ignore diff --git a/docker/Dockerfile_dev-ros b/docker/Dockerfile_dev-ros index dad2d58..d9d86e8 100644 --- a/docker/Dockerfile_dev-ros +++ b/docker/Dockerfile_dev-ros @@ -43,7 +43,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ - PIP_DISABLE_PIP_VERSION_CHECK=on + PIP_DISABLE_PIP_VERSION_CHECK=on \ + PIP_BREAK_SYSTEM_PACKAGES=1 # TAKEN from https://github.com/docker-library/python/blob/a58630aef106c8efd710011c6a2a0a1d551319a0/3.11/bullseye/Dockerfile # if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" @@ -66,14 +67,10 @@ RUN set -eux; \ --break-system-packages \ "pip==$PYTHON_PIP_VERSION" \ "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - wheel \ ; \ rm -f get-pip.py; \ \ - pip --version; \ - mkdir -p ~/.config/pip \ - && echo "[global]" >> ~/.config/pip/pip.conf \ - && echo "break-system-packages = true" >> ~/.config/pip/pip.conf + pip --version; RUN python -m pip install --no-cache-dir -U wheel future lxml pexpect fastcrc flake8 pycodestyle empy==3.3.4 pyelftools tabulate pre-commit junitparser ptyprocess dronecan pymavlink requests mock @@ -136,3 +133,5 @@ ENV TZ=UTC ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV PIP_DISABLE_PIP_VERSION_CHECK=on +ENV PIP_BREAK_SYSTEM_PACKAGES=1 +ENV PIP_ROOT_USER_ACTION=ignore