Skip to content

Commit

Permalink
Add uv tool install example in Docker (#6547)
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Aug 23, 2024
1 parent 6cf5d13 commit 60fc2e7
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/guides/integration/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,32 @@ And, to start your application by default:
CMD ["uv", "run", "my_app"]
```

## Using installed tools

To use installed tools, ensure the [tool bin directory](../../concepts/tools.md#the-bin-directory)
is on the path:

```dockerfile title="Dockerfile"
ENV PATH=/root/.local/bin:$PATH
RUN uv tool install cowsay
```

```console
$ docker run -it $(docker build -q .) /bin/bash -c "cowsay -t hello"
_____
| hello |
=====
\
\
^__^
(oo)\_______
(__)\ )\/\
||----w |
|| ||
```

To determine the tool bin directory, run `uv tool dir --bin` in the container.

## Using the pip interface

### Installing a package
Expand Down

0 comments on commit 60fc2e7

Please sign in to comment.