From 38db7c1e299d22646e82a03024a0a41b80d10e79 Mon Sep 17 00:00:00 2001 From: Eugene Mwangi Date: Thu, 6 Aug 2026 19:11:57 +0300 Subject: [PATCH] chore(uv): Enable dependabot upgrades for `uv` image tags Move UV into FROM statement to trigger Dependabot Docker image tag upgrades for UV. [Note] - (style) Add headers to clearly distinct multi-stage sections. - (tag) Upgrade to latest available UV patch version: v0.12.2 Signed-off-by: Eugene Mwangi --- backend/Dockerfile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 401eb536a3..f694654f5e 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,3 +1,6 @@ +# ============================================================================== +# Frontend: build +# ============================================================================== FROM oven/bun:1 AS frontend-build WORKDIR /app @@ -15,15 +18,18 @@ ARG VITE_API_URL= RUN bun run build +# ============================================================================== +# Dependency: pull in the standalone uv binary +# ============================================================================== +FROM ghcr.io/astral-sh/uv:0.12.2 AS uv-binary -FROM python:3.14 +# ============================================================================== +# Runtime: backend build + app run +# ============================================================================== +FROM python:3.14 AS runtime ENV PYTHONUNBUFFERED=1 -# Install uv -# Ref: https://docs.astral.sh/uv/guides/integration/docker/#installing-uv -COPY --from=ghcr.io/astral-sh/uv:0.9.26 /uv /uvx /bin/ - # Compile bytecode # Ref: https://docs.astral.sh/uv/guides/integration/docker/#compiling-bytecode ENV UV_COMPILE_BYTECODE=1 @@ -38,6 +44,9 @@ WORKDIR /app/ # Ref: https://docs.astral.sh/uv/guides/integration/docker/#using-the-environment ENV PATH="/app/.venv/bin:$PATH" +# provision package manager +COPY --from=uv-binary /uv /usr/local/bin/uv + # Install dependencies # Ref: https://docs.astral.sh/uv/guides/integration/docker/#intermediate-layers RUN --mount=type=cache,target=/root/.cache/uv \