Skip to content

Commit 9d75e6f

Browse files
committed
Improve uv caching in Dockerfile
1 parent 501c7f1 commit 9d75e6f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docker/Dockerfile.backend

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
6363
--link-mode copy \
6464
--no-install-project \
6565
--all-extras \
66-
--compile-bytecode
66+
--compile-bytecode \
67+
&& uv pip install pip \
68+
&& uv cache prune --ci
6769

6870

6971
FROM base AS prod
@@ -88,6 +90,7 @@ RUN --mount=type=cache,target=/root/.cache/uv \
8890
--no-install-project \
8991
--all-extras \
9092
--group "test" \
91-
--compile-bytecode
93+
--compile-bytecode \
94+
&& uv cache prune --ci
9295

9396
RUN sed -i 's/python -m/coverage run -m/g' /app/docker/entrypoint.sh

0 commit comments

Comments
 (0)