diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 25e0422753c37..465d863cf56f7 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -221,6 +221,7 @@ jobs: cat < Dockerfile FROM ${BASE_IMAGE} COPY --from=${{ env.UV_GHCR_IMAGE }}:latest /uv /uvx /usr/local/bin/ + ENV UV_TOOL_BIN_DIR="/usr/local/bin" ENTRYPOINT [] CMD ["/usr/local/bin/uv"] EOF diff --git a/docs/guides/integration/docker.md b/docs/guides/integration/docker.md index 55f86fad656c2..e799ae15fb6f0 100644 --- a/docs/guides/integration/docker.md +++ b/docs/guides/integration/docker.md @@ -77,6 +77,9 @@ As with the distroless image, each derived image is published with uv version ta `ghcr.io/astral-sh/uv:{major}.{minor}.{patch}-{base}` and `ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.7.13-alpine`. +In addition, starting with `0.8` each derived image also sets `UV_TOOL_BIN_DIR` to `/usr/local/bin` +to allow `uv tool install` to work as expected with the default user. + For more details, see the [GitHub Container](https://github.com/astral-sh/uv/pkgs/container/uv) page.