Skip to content

Commit dd571ae

Browse files
committed
feat(docker): set default UV_TOOL_BIN_DIR
1 parent a82c210 commit dd571ae

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

.github/workflows/build-docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ jobs:
221221
cat <<EOF > Dockerfile
222222
FROM ${BASE_IMAGE}
223223
COPY --from=${{ env.UV_GHCR_IMAGE }}:latest /uv /uvx /usr/local/bin/
224+
ENV UV_TOOL_BIN_DIR="/usr/local/bin"
224225
ENTRYPOINT []
225226
CMD ["/usr/local/bin/uv"]
226227
EOF

docs/guides/integration/docker.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ As with the distroless image, each derived image is published with uv version ta
7777
`ghcr.io/astral-sh/uv:{major}.{minor}.{patch}-{base}` and
7878
`ghcr.io/astral-sh/uv:{major}.{minor}-{base}`, e.g., `ghcr.io/astral-sh/uv:0.7.13-alpine`.
7979

80+
In addition, starting with `0.8` each derived image also sets `UV_TOOL_BIN_DIR` to `/usr/local/bin`
81+
to allow `uv tool install` to work as expected with the default user.
82+
8083
For more details, see the [GitHub Container](https://github.com/astral-sh/uv/pkgs/container/uv)
8184
page.
8285

0 commit comments

Comments
 (0)