Internal
Public Access
Fix pip upgrade to install in user directory
Changed pip upgrade to use --user flag so the upgraded pip is installed to /root/.local and gets copied to the runtime stage. Previous version upgraded pip globally in builder stage but runtime stage was still using base image's pip (25.0.1). Now the upgraded pip is in .local/bin which is in the PATH in the runtime container. This fixes CVE-2025-8869 in pip. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.5
parent
4a6b9a991f
commit
f7586f2a93
+2
-2
@@ -11,8 +11,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Upgrade pip to latest version (security)
|
# Upgrade pip to latest version (security) - install to user directory
|
||||||
RUN pip install --upgrade pip
|
RUN pip install --user --upgrade pip
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
COPY requirements.txt /tmp/
|
COPY requirements.txt /tmp/
|
||||||
|
|||||||
Reference in New Issue
Block a user