From ba36bf27fa16d4bf51cf7fb5decf4b259985bfec Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 5 Oct 2026 20:41:36 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(dockerfile)=20remove=20pip=20from?= =?UTF-8?q?=20backend=20image?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pip is not used in production, we can remove it in the production to avoid having to maintain library linked to it and that can possibly contains CVEs --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1da2e40dd..ad02b3942 100644 --- a/Dockerfile +++ b/Dockerfile @@ -160,6 +160,9 @@ FROM core AS backend-production # Remove apk cache, we don't need it anymore RUN rm -rf /var/cache/apk/* +# pip is not needed at runtime (the dependencies are installed with uv) +RUN /usr/local/bin/python -m pip uninstall --yes pip + ARG IMPRESS_STATIC_ROOT=/data/static # Gunicorn - not used by default but configuration file is provided