Skip to content

Commit 7efaf7c

Browse files
Revert "removed mount from dockerfiles"
This reverts commit 0b561fa.
1 parent 96845b5 commit 7efaf7c

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/App/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ WORKDIR /app
3434
COPY pyproject.toml requirements.txt* uv.lock* ./
3535

3636
# Install Python dependencies using UV
37-
RUN if [ -f "requirements.txt" ]; then \
37+
RUN --mount=type=cache,target=/root/.cache/uv \
38+
if [ -f "requirements.txt" ]; then \
3839
uv pip install --system -r requirements.txt && uv pip install --system "uvicorn[standard]"; \
3940
else \
4041
uv pip install --system pyproject.toml && uv pip install --system "uvicorn[standard]"; \

src/backend/Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
88

99
WORKDIR /app
1010

11-
# Copy lock and project files first for better layer caching
12-
COPY uv.lock pyproject.toml /app/
13-
1411
# Install the project's dependencies using the lockfile and settings
15-
RUN uv sync --frozen --no-install-project --no-dev
12+
RUN --mount=type=cache,target=/root/.cache/uv \
13+
--mount=type=bind,source=uv.lock,target=uv.lock \
14+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
15+
uv sync --frozen --no-install-project --no-dev
16+
#RUN uv sync --frozen --no-install-project --no-dev
1617

1718
# Backend app setup
1819
COPY . /app
19-
RUN uv sync --frozen --no-dev
20+
RUN --mount=type=cache,target=/root/.cache/uv uv sync --frozen --no-dev
21+
#RUN uv sync --frozen --no-dev
2022

2123

2224
FROM base

0 commit comments

Comments
 (0)