containerfile: use --no-deps to prevent jaraco.context downgrade

This commit is contained in:
Username
2026-01-20 08:25:16 +01:00
parent 329563f4b9
commit 5a05af4764

View File

@@ -21,7 +21,7 @@ RUN pip install --no-cache-dir --upgrade "pip>=25.3" wheel
# Install Python dependencies (includes security pins from requirements.txt)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt gunicorn && \
pip install --no-cache-dir --force-reinstall "jaraco.context>=6.1.0"
pip install --no-cache-dir --force-reinstall --no-deps "jaraco.context>=6.1.0"
# Stage 2: Alpine runtime (minimal)
@@ -34,7 +34,7 @@ LABEL description="Minimal secure pastebin REST API (Alpine)"
COPY requirements.txt /tmp/
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r /tmp/requirements.txt && \
pip install --no-cache-dir --force-reinstall "jaraco.context>=6.1.0" && \
pip install --no-cache-dir --force-reinstall --no-deps "jaraco.context>=6.1.0" && \
rm /tmp/requirements.txt
# Create non-root user