Skip to content

Commit 1e5fa4d

Browse files
authored
Use cache mounts during uv sync operations (#9)
1 parent 7d44dd2 commit 1e5fa4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,13 @@ ADD .dockerignore .
1010
WORKDIR /app
1111
ADD uv.lock /app/uv.lock
1212
ADD pyproject.toml /app/pyproject.toml
13-
RUN uv sync --frozen --no-install-project
13+
RUN --mount=type=cache,target=/root/.cache/uv \
14+
uv sync --frozen --no-install-project
1415

1516
# Then, install the rest of the project
1617
ADD . /app
17-
RUN uv sync --frozen
18+
RUN --mount=type=cache,target=/root/.cache/uv \
19+
uv sync --frozen
1820

1921
# Place executables in the environment at the front of the path
2022
ENV PATH="/app/.venv/bin:$PATH"

0 commit comments

Comments
 (0)