fix(docker): eliminate race conditions in shared buildkit cache mounts (#44984)

This commit is contained in:
weizhoublue
2026-06-26 19:43:17 -07:00
committed by GitHub
parent 1a92dfcce4
commit 2e058851d3
3 changed files with 8 additions and 6 deletions
+3 -2
View File
@@ -311,9 +311,10 @@ ENV CARGO_BUILD_JOBS=4
# Build the release artifacts. Cache cargo registry/git, but not target/,
# because stale target metadata can outlive source updates across BuildKit
# cache reuse.
RUN --mount=type=cache,target=/root/.cargo/registry \
--mount=type=cache,target=/root/.cargo/git \
RUN --mount=type=cache,target=/root/.cargo/registry,sharing=locked \
--mount=type=cache,target=/root/.cargo/git,sharing=locked \
bash build_rust.sh
#################### RUST BUILD IMAGE ####################
#################### CSRC BUILD IMAGE ####################