Skip to content

Commit 5d06fac

Browse files
committed
Use absolute path for uv cache
1 parent 44b1459 commit 5d06fac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ COPY --chown=nonroot:nonroot Makefile .
4646
# Dev image, contains all files and dependencies
4747
FROM base_builder AS dev
4848
COPY --chown=nonroot:nonroot . .
49-
RUN --mount=type=cache,id=uv,target=~/.cache/uv,sharing=locked \
49+
RUN --mount=type=cache,id=uv,target=/home/nonroot/.cache/uv,sharing=locked \
5050
make dev-dependencies
5151

5252
# Note that opentelemetry doesn't play well together with uvicorn reloader
@@ -55,22 +55,22 @@ CMD ["uvicorn", "http_app:create_app", "--host", "0.0.0.0", "--port", "8000", "-
5555

5656
# Installs requirements to run production dramatiq application
5757
FROM base_builder AS dramatiq_builder
58-
RUN --mount=type=cache,id=uv,target=~/.cache/uv,sharing=locked \
58+
RUN --mount=type=cache,id=uv,target=/home/nonroot/.cache/uv,sharing=locked \
5959
uv sync --no-dev --no-install-project --frozen --no-editable
6060

6161
# Installs requirements to run production http application
6262
FROM base_builder AS http_builder
63-
RUN --mount=type=cache,id=uv,target=~/.cache/uv,sharing=locked \
63+
RUN --mount=type=cache,id=uv,target=/home/nonroot/.cache/uv,sharing=locked \
6464
uv sync --no-dev --group http --no-install-project --frozen --no-editable
6565

6666
# Installs requirements to run production socketio application
6767
FROM base_builder AS socketio_builder
68-
RUN --mount=type=cache,id=uv,target=~/.cache/uv,sharing=locked \
68+
RUN --mount=type=cache,id=uv,target=/home/nonroot/.cache/uv,sharing=locked \
6969
uv sync --no-dev --group socketio --no-install-project --frozen --no-editable
7070

7171
# Installs requirements to run production migrations application
7272
FROM base_builder AS migrations_builder
73-
RUN --mount=type=cache,target=~/.cache/uv,sharing=locked \
73+
RUN --mount=type=cache,target=/home/nonroot/.cache/uv,sharing=locked \
7474
uv sync --no-dev --group migrations --no-install-project --frozen --no-editable
7575

7676
# Create the base app with the common python packages

0 commit comments

Comments
 (0)