From ca57929f6bd6342952e25e411e5ac3081c36fb34 Mon Sep 17 00:00:00 2001 From: valankar <31250800+valankar@users.noreply.github.com> Date: Tue, 10 Sep 2024 09:34:43 +0200 Subject: [PATCH] Add comment explaining reasoning for calling uv sync twice. I was rather confused why there were 2 `uv sync` calls in the file and found out more from `uv help sync`. Added a comment to make it clearer. --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 319e67a..a914bd7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --frozen --no-install-project --no-dev # Then, add the rest of the project source code and install it +# Installing separately from its dependencies allows optimal layer caching ADD . /app RUN --mount=type=cache,target=/root/.cache/uv \ uv sync --frozen --no-dev