container: upgrade system setuptools to fix jaraco.context CVE

This commit is contained in:
Username
2026-01-18 11:12:17 +01:00
parent 6c0e2ab07f
commit cc1bba9a57

View File

@@ -29,8 +29,9 @@ FROM python:3.11-slim
LABEL maintainer="FlaskPaste"
LABEL description="Lightweight secure pastebin REST API"
# Clean base image caches and create non-root user
# Clean base image caches, upgrade system pip/setuptools, create non-root user
RUN apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& pip install --no-cache-dir --upgrade pip setuptools \
&& groupadd -r flaskpaste && useradd -r -g flaskpaste flaskpaste
# Copy virtual environment from builder