From be79fdac807c0476c487e3ecffd9512075d7bc6c Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Fri, 20 Feb 2026 15:28:02 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9(summary)=20fix=20pip=20uninstall?= =?UTF-8?q?=20order=20in=20build=20stages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pip was removed before copying the builder stage output, which caused it to be reinstalled unintentionally. Adjust the order to align with the backend image behavior. --- src/summary/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/summary/Dockerfile b/src/summary/Dockerfile index 7cd1235a..2b1d4368 100644 --- a/src/summary/Dockerfile +++ b/src/summary/Dockerfile @@ -25,6 +25,8 @@ FROM base AS production WORKDIR /app +COPY --from=builder /usr/local /usr/local + # Remove pip to reduce attack surface in production RUN pip uninstall -y pip @@ -32,7 +34,6 @@ RUN pip uninstall -y pip ARG DOCKER_USER USER ${DOCKER_USER} -COPY --from=builder /usr/local /usr/local COPY ./summary /app/summary CMD ["uvicorn", "summary.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]