docker: Further optimize multi-layered build.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk committed 2025-05-28 08:50:00 +00:00
1 parent 98bbf58121
commit 3ffc238799
7 files changed
+28 -1

No files matched your search

+6
View File
@@ -8,6 +8,9 @@ ARG CARGO_TARGET
ARG rustup_version="1.28.1"
ARG rustup_components
WORKDIR /
COPY --link --from=input . .
WORKDIR /opt
RUN \
--mount=type=cache,dst=${RUSTUP_HOME},sharing=locked \
@@ -50,6 +53,9 @@ ARG CARGO_HOME
ARG CARGO_TARGET
ARG cargo_installs
WORKDIR /
COPY --link --from=input . .
RUN \
--mount=type=cache,dst=${RUSTUP_HOME},sharing=locked \
--mount=type=cache,dst=${CARGO_HOME},sharing=locked \