diff --git a/docs/guides/integration/docker.md b/docs/guides/integration/docker.md index 066c8ad4c593..345bb773b3b9 100644 --- a/docs/guides/integration/docker.md +++ b/docs/guides/integration/docker.md @@ -301,10 +301,15 @@ A [cache mount](https://docs.docker.com/build/guide/mounts/#add-a-cache-mount) c improve performance across builds: ```dockerfile title="Dockerfile" +ENV UV_LINK_MODE=copy + RUN --mount=type=cache,target=/root/.cache/uv \ uv sync ``` +Changing the default [`UV_LINK_MODE`](../../reference/settings.md#link-mode) silences warnings about +not being able to use hard links since the cache and sync target are on separate file systems. + If you're not mounting the cache, image size can be reduced by using the `--no-cache` flag or setting `UV_NO_CACHE`.