docker: Fix target mount cache paths; relax locks on cargo home.

docker: Persist lychee cache.

Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
Jason Volk
2025-06-01 11:40:09 +00:00
parent 8d8fcb588b
commit 9507ce9d03
17 changed files with 270 additions and 133 deletions

View File

@@ -7,10 +7,14 @@ ARG RUSTUP_HOME
ARG CARGO_HOME
ARG audit_args=""
WORKDIR /
COPY --link --from=input . .
WORKDIR /usr/src/tuwunel
RUN \
--mount=type=cache,dst=${RUSTUP_HOME},sharing=locked \
--mount=type=cache,dst=${CARGO_HOME},sharing=locked \
--mount=type=cache,dst=${RUSTUP_HOME}/downloads,sharing=shared,ro \
--mount=type=cache,dst=${CARGO_HOME}/registry,sharing=shared,ro \
--mount=type=cache,dst=${CARGO_HOME}/git,sharing=shared,ro \
<<EOF
set -eux
rustup run ${rust_toolchain} \