diff --git a/prod.Dockerfile b/prod.Dockerfile index d9a0c8e..f740b61 100644 --- a/prod.Dockerfile +++ b/prod.Dockerfile @@ -2,7 +2,7 @@ FROM python:3.12-slim # The uv installer requires curl (and certificates) to download the release archive RUN apt-get update; \ - apt-get install -y --no-install-recommends ca-certificates curl vim libprotobuf-c1; \ + apt-get install -y --no-install-recommends ca-certificates curl vim libprotobuf-c1 build-essential; \ apt-get autoremove --purge -y; \ apt-get clean -y; \ rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* @@ -39,6 +39,10 @@ COPY . /app RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --frozen --no-dev +RUN apt-get purge -y --auto-remove build-essential; \ + apt-get clean -y; \ + rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/* + # Place executables in the environment at the front of the path ENV PATH="/app/.venv/bin:$PATH" COPY ./entrypoint.sh /entrypoint.sh