containerfile: use --no-deps to prevent jaraco.context downgrade
All checks were successful
CI / Security Scan (push) Successful in 20s
CI / Lint & Format (push) Successful in 24s
CI / Advanced Security Tests (push) Successful in 16s
CI / Memory Leak Check (push) Successful in 20s
CI / Security Tests (push) Successful in 26s
CI / Unit Tests (push) Successful in 34s
CI / Fuzz Testing (push) Successful in 24s
CI / SBOM Generation (push) Successful in 20s
CI / Build & Push Image (push) Successful in 31s
CI / Harbor Vulnerability Scan (push) Successful in 34s

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