From c001f2d80d12057a57de645ae1214147a2a7687b Mon Sep 17 00:00:00 2001 From: Zanie Blue Date: Mon, 12 May 2025 15:42:21 -0500 Subject: [PATCH] Recommend `--locked` over `--frozen` (matching uv docs) --- Dockerfile | 4 ++-- README.md | 2 +- multistage.Dockerfile | 4 ++-- standalone.Dockerfile | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 28c206a..95d8807 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,13 +14,13 @@ ENV UV_LINK_MODE=copy RUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ - uv sync --frozen --no-install-project --no-dev + uv sync --locked --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 COPY . /app RUN --mount=type=cache,target=/root/.cache/uv \ - uv sync --frozen --no-dev + uv sync --locked --no-dev # Place executables in the environment at the front of the path ENV PATH="/app/.venv/bin:$PATH" diff --git a/README.md b/README.md index 3659970..0504590 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ dependency, includes FastAPI as a dependency, and defines a `hello` entrypoint f To check that the environment is up-to-date after image builds: ```console -$ ./run.sh uv sync --frozen +$ ./run.sh uv sync --locked Audited 2 packages ... ``` diff --git a/multistage.Dockerfile b/multistage.Dockerfile index 26389d2..8f0d0fa 100644 --- a/multistage.Dockerfile +++ b/multistage.Dockerfile @@ -15,10 +15,10 @@ WORKDIR /app RUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ - uv sync --frozen --no-install-project --no-dev + uv sync --locked --no-install-project --no-dev COPY . /app RUN --mount=type=cache,target=/root/.cache/uv \ - uv sync --frozen --no-dev + uv sync --locked --no-dev # Then, use a final image without uv diff --git a/standalone.Dockerfile b/standalone.Dockerfile index bfa26ae..24fb8db 100644 --- a/standalone.Dockerfile +++ b/standalone.Dockerfile @@ -17,10 +17,10 @@ WORKDIR /app RUN --mount=type=cache,target=/root/.cache/uv \ --mount=type=bind,source=uv.lock,target=uv.lock \ --mount=type=bind,source=pyproject.toml,target=pyproject.toml \ - uv sync --frozen --no-install-project --no-dev + uv sync --locked --no-install-project --no-dev COPY . /app RUN --mount=type=cache,target=/root/.cache/uv \ - uv sync --frozen --no-dev + uv sync --locked --no-dev # Then, use a final image without uv FROM debian:bookworm-slim