mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
parent
da7ffd3357
commit
05446cd736
2 changed files with 5 additions and 5 deletions
|
@ -74,7 +74,7 @@ official distroless Docker image:
|
|||
|
||||
```dockerfile title="Dockerfile"
|
||||
FROM python:3.12-slim-bookworm
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
```
|
||||
|
||||
Or, with the installer:
|
||||
|
@ -100,7 +100,7 @@ Note this requires `curl` to be available.
|
|||
In either case, it is best practice to pin to a specific uv version, e.g., with:
|
||||
|
||||
```dockerfile
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /uvx /bin/
|
||||
```
|
||||
|
||||
Or, with the installer:
|
||||
|
@ -342,7 +342,7 @@ a big time saver.
|
|||
```dockerfile title="Dockerfile"
|
||||
# Install uv
|
||||
FROM python:3.12-slim
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
# Change the working directory to the `app` directory
|
||||
WORKDIR /app
|
||||
|
@ -388,7 +388,7 @@ For example:
|
|||
```dockerfile title="Dockerfile"
|
||||
# Install uv
|
||||
FROM python:3.12-slim AS builder
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
# Change the working directory to the `app` directory
|
||||
WORKDIR /app
|
||||
|
|
|
@ -96,7 +96,7 @@ To deploy the FastAPI application with Docker, you can use the following `Docker
|
|||
FROM python:3.12-slim
|
||||
|
||||
# Install uv.
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
|
||||
|
||||
# Copy the application into the container.
|
||||
COPY . /app
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue