From 544c8e145781181cd4781c6112dbb2c6433a7d53 Mon Sep 17 00:00:00 2001 From: aniebietafia Date: Sat, 23 May 2026 13:00:53 +0100 Subject: [PATCH] fix(docker): align builder and runtime workdir to resolve shebang paths Change builder stage WORKDIR from `/build` to `/app` to ensure virtual environment script shebangs (like `uvicorn`) resolve to valid absolute paths in the final runtime container. Signed-off-by: aniebietafia --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7f2682b..6842fd7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # ============================================================ FROM python:3.11-slim AS builder -WORKDIR /build +WORKDIR /app # Copy uv binary from the official image COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ @@ -33,7 +33,7 @@ RUN groupadd -r appuser && useradd -r -g appuser appuser WORKDIR /app # Copy the virtual environment from the builder -COPY --from=builder /build/.venv /app/.venv +COPY --from=builder /app/.venv /app/.venv # Copy application source COPY pyproject.toml ./