mirror of https://github.com/astral-sh/uv
Update Docker integration guide to prefer `COPY` over `ADD` for simple cases (#16883)
## Summary Docker best practices recommend to use `COPY` when the additional functionality of `ADD` is not used. See: - https://docs.docker.com/build/building/best-practices/#add-or-copy - https://www.docker.com/blog/docker-best-practices-understanding-the-differences-between-add-and-copy-instructions-in-dockerfiles/ ## Test Plan Docs only change
This commit is contained in:
parent
99660a8574
commit
539b7368cd
|
|
@ -163,7 +163,7 @@ If you're using uv to manage your project, you can copy it into the image and in
|
|||
|
||||
```dockerfile title="Dockerfile"
|
||||
# Copy the project into the image
|
||||
ADD . /app
|
||||
COPY . /app
|
||||
|
||||
# Sync the project into a new environment, asserting the lockfile is up to date
|
||||
WORKDIR /app
|
||||
|
|
@ -412,7 +412,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||
uv sync --locked --no-install-project
|
||||
|
||||
# Copy the project into the image
|
||||
ADD . /app
|
||||
COPY . /app
|
||||
|
||||
# Sync the project
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
|
|
@ -447,7 +447,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
uv sync --frozen --no-install-workspace
|
||||
|
||||
ADD . /app
|
||||
COPY . /app
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv sync --locked
|
||||
|
|
@ -487,7 +487,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
|||
uv sync --locked --no-install-project --no-editable
|
||||
|
||||
# Copy the project into the intermediate image
|
||||
ADD . /app
|
||||
COPY . /app
|
||||
|
||||
# Sync the project
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
|
|
|
|||
Loading…
Reference in New Issue