Skip to content

Commit 18939ec

Browse files
committed
feat(docker): set default UV_TOOL_BIN_DIR
1 parent 4109210 commit 18939ec

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
@@ -236,6 +236,7 @@ jobs:
236236
cat <<EOF > Dockerfile
237237
FROM ${BASE_IMAGE}
238238
COPY --from=${{ env.UV_BASE_IMG }}:latest /uv /uvx /usr/local/bin/
239+
ENV UV_TOOL_BIN_DIR="/usr/local/bin"
239240
ENTRYPOINT []
240241
CMD ["/usr/local/bin/uv"]
241242
EOF

docs/guides/integration/docker.md

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

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

0 commit comments

Comments
 (0)