Skip to content

Commit 12eb4cf

Browse files
committed
fix(container): bootstrap pip with --break-system-packages for PEP 668
Made-with: Cursor
1 parent d91834e commit 12eb4cf

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Containerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ RUN apt-get update \
2222
&& apt-get clean \
2323
&& rm -rf /var/lib/apt/lists/*
2424

25-
# deadsnakes PPA does not ship python3.x-pip or ensurepip; bootstrap via get-pip.py
25+
# deadsnakes PPA does not ship python3.x-pip; bootstrap via get-pip.py.
26+
# PEP 668 marks the environment as externally managed; --break-system-packages is
27+
# acceptable in a container image where we own the environment.
2628
# hadolint ignore=DL4006
2729
RUN curl -sSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
28-
&& python3.12 /tmp/get-pip.py --no-cache-dir \
29-
&& python3.13 /tmp/get-pip.py --no-cache-dir \
30+
&& python3.12 /tmp/get-pip.py --no-cache-dir --break-system-packages \
31+
&& python3.13 /tmp/get-pip.py --no-cache-dir --break-system-packages \
3032
&& rm /tmp/get-pip.py
3133

3234
# Configure buildah storage for container/rootless usage

0 commit comments

Comments
 (0)