🩹(summary) fix pip uninstall order in build stages
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.
This commit is contained in:
committed by
aleb_the_flash
parent
75a15a0004
commit
be79fdac80
@@ -25,6 +25,8 @@ FROM base AS production
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY --from=builder /usr/local /usr/local
|
||||||
|
|
||||||
# Remove pip to reduce attack surface in production
|
# Remove pip to reduce attack surface in production
|
||||||
RUN pip uninstall -y pip
|
RUN pip uninstall -y pip
|
||||||
|
|
||||||
@@ -32,7 +34,6 @@ RUN pip uninstall -y pip
|
|||||||
ARG DOCKER_USER
|
ARG DOCKER_USER
|
||||||
USER ${DOCKER_USER}
|
USER ${DOCKER_USER}
|
||||||
|
|
||||||
COPY --from=builder /usr/local /usr/local
|
|
||||||
COPY ./summary /app/summary
|
COPY ./summary /app/summary
|
||||||
|
|
||||||
CMD ["uvicorn", "summary.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]
|
CMD ["uvicorn", "summary.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]
|
||||||
|
|||||||
Reference in New Issue
Block a user