Skip to content

Commit c0e9dde

Browse files
committed
docker: fix pip system install
1 parent 32a4874 commit c0e9dde

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

docker/Dockerfile_dev-base

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ RUN apt-get update \
3939

4040
ENV PYTHONUNBUFFERED=1 \
4141
PYTHONDONTWRITEBYTECODE=1 \
42-
PIP_DISABLE_PIP_VERSION_CHECK=on
42+
PIP_DISABLE_PIP_VERSION_CHECK=on \
43+
PIP_BREAK_SYSTEM_PACKAGES=1
4344

4445
# TAKEN from https://github.com/docker-library/python/blob/a58630aef106c8efd710011c6a2a0a1d551319a0/3.11/bullseye/Dockerfile
4546
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
@@ -62,14 +63,10 @@ RUN set -eux; \
6263
--break-system-packages \
6364
"pip==$PYTHON_PIP_VERSION" \
6465
"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
65-
wheel \
6666
; \
6767
rm -f get-pip.py; \
6868
\
69-
pip --version; \
70-
mkdir -p ~/.config/pip \
71-
&& echo "[global]" >> ~/.config/pip/pip.conf \
72-
&& echo "break-system-packages = true" >> ~/.config/pip/pip.conf
69+
pip --version
7370

7471
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
7572

@@ -110,3 +107,5 @@ ENV TZ=UTC
110107
ENV PYTHONDONTWRITEBYTECODE=1
111108
ENV PYTHONUNBUFFERED=1
112109
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
110+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
111+
ENV PIP_ROOT_USER_ACTION=ignore

docker/Dockerfile_dev-ros

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
4343

4444
ENV PYTHONUNBUFFERED=1 \
4545
PYTHONDONTWRITEBYTECODE=1 \
46-
PIP_DISABLE_PIP_VERSION_CHECK=on
46+
PIP_DISABLE_PIP_VERSION_CHECK=on \
47+
PIP_BREAK_SYSTEM_PACKAGES=1
4748

4849
# TAKEN from https://github.com/docker-library/python/blob/a58630aef106c8efd710011c6a2a0a1d551319a0/3.11/bullseye/Dockerfile
4950
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
@@ -66,14 +67,10 @@ RUN set -eux; \
6667
--break-system-packages \
6768
"pip==$PYTHON_PIP_VERSION" \
6869
"setuptools==$PYTHON_SETUPTOOLS_VERSION" \
69-
wheel \
7070
; \
7171
rm -f get-pip.py; \
7272
\
73-
pip --version; \
74-
mkdir -p ~/.config/pip \
75-
&& echo "[global]" >> ~/.config/pip/pip.conf \
76-
&& echo "break-system-packages = true" >> ~/.config/pip/pip.conf
73+
pip --version;
7774

7875
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
7976

@@ -136,3 +133,5 @@ ENV TZ=UTC
136133
ENV PYTHONDONTWRITEBYTECODE=1
137134
ENV PYTHONUNBUFFERED=1
138135
ENV PIP_DISABLE_PIP_VERSION_CHECK=on
136+
ENV PIP_BREAK_SYSTEM_PACKAGES=1
137+
ENV PIP_ROOT_USER_ACTION=ignore

0 commit comments

Comments
 (0)