diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml index 843ee8dfb..3c080b63f 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yml @@ -225,6 +225,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 0445b155c..803e7a805 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.20-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.