From 040e57c3c02ef5b2e95bcb211a29dc43aa25fb61 Mon Sep 17 00:00:00 2001 From: nfel Date: Tue, 4 Aug 2026 21:50:26 +0330 Subject: [PATCH] Call uv by full path in single RUN layer The install script doesn't modify PATH for the shell. Call uv via full path (/root/.local/bin/uv) in the same RUN so there's no layer boundary issue. Co-authored-by: Qwen-Coder --- Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6d1acd6..1b81cf5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,12 +67,12 @@ WORKDIR /app # Copy manifests + lockfile first (stable cache layer) COPY pyproject.toml uv.lock* ./ -# Install deps natively so the venv targets this image's Python -# (Playwright Noble ships uv via entrypoint shim but not in PATH) -RUN curl -LsSf https://astral.sh/uv/install.sh | sh 2>&1 -ENV PATH="/root/.local/bin:$PATH" - -RUN uv sync --frozen --no-dev --no-install-project +# Install uv, then build deps natively so the venv targets this image's Python +# (Playwright Noble ships Python but not uv or pip) +RUN mkdir -p /root/.local/bin \ + && curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/root/.local sh \ + && /root/.local/bin/uv sync --frozen --no-dev --no-install-project \ + && ln -sf /root/.local/bin/uv /usr/local/bin/uv # Copy app code (busts cache on code changes, not deps) COPY . .