From 539b7368cdfca9245bea05e5da7e6103f9c5891e Mon Sep 17 00:00:00 2001 From: Matthijs Kok Date: Wed, 3 Dec 2025 16:16:42 +0100 Subject: [PATCH] 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 --- docs/guides/integration/docker.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/integration/docker.md b/docs/guides/integration/docker.md index 77d6016b4..dc4934648 100644 --- a/docs/guides/integration/docker.md +++ b/docs/guides/integration/docker.md @@ -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 \