Skip to content

Commit

Permalink
try fix docker cache
Browse files Browse the repository at this point in the history
  • Loading branch information
sstepanchuk committed Feb 21, 2025
1 parent 53389a0 commit 913d14d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ WORKDIR /app

FROM chef AS planner

COPY . .
COPY */Cargo.toml */*/Cargo.toml ./
COPY Cargo.lock */Cargo.lock */*/Cargo.lock ./
RUN cargo chef prepare --recipe-path recipe.json

# dependency builder
Expand All @@ -25,7 +26,7 @@ RUN wget https://github.com/cargo-bins/cargo-binstall/releases/latest/download/c
&& cp cargo-binstall /usr/local/cargo/bin \
&& cargo binstall cargo-leptos -y

COPY --from=planner /app/ .
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=$SCCACHE_DIR,sharing=locked \
Expand Down

0 comments on commit 913d14d

Please sign in to comment.