Skip to content

Commit 48a8477

Browse files
fix(container): bootstrap pip via get-pip.py for deadsnakes Python
deadsnakes PPA does not ship ensurepip; use PyPA get-pip.py instead. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 9554b0d commit 48a8477

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Containerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ 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; bootstrap pip via ensurepip
26-
RUN python3.12 -m ensurepip --upgrade \
27-
&& python3.13 -m ensurepip --upgrade
25+
# deadsnakes PPA does not ship python3.x-pip or ensurepip; bootstrap via get-pip.py
26+
# hadolint ignore=DL4006
27+
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+
&& rm /tmp/get-pip.py
2831

2932
# Configure buildah storage for container/rootless usage
3033
RUN mkdir -p /etc/containers \

0 commit comments

Comments
 (0)