From a218d355ee6847f7a1552c9978ca68b53772bd91 Mon Sep 17 00:00:00 2001 From: Gautam Gupta Date: Thu, 30 Jan 2025 20:13:22 -0800 Subject: [PATCH] more caching in the OSS dockerfile (#33842) this speeds up rebuilds a bit GitOrigin-RevId: 0006063f131acea60997efa26cf4dd505be4a535 --- self-hosted/Dockerfile.backend | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/self-hosted/Dockerfile.backend b/self-hosted/Dockerfile.backend index 9cf14437..6b280451 100644 --- a/self-hosted/Dockerfile.backend +++ b/self-hosted/Dockerfile.backend @@ -67,12 +67,12 @@ RUN --mount=type=cache,target=/convex/npm-packages/common/temp/,sharing=locked j COPY --from=chef /tmp/recipe.json recipe.json # Use cargo-chef to build dependencies from the recipe created in the first stage # This step will be cached unless dependencies change -RUN --mount=type=cache,target=/convex/target/ cargo chef cook --release --recipe-path recipe.json +RUN --mount=type=cache,target=/convex/target/ --mount=type=cache,target=/usr/local/cargo/git/db --mount=type=cache,target=/usr/local/cargo/registry/ cargo chef cook --release --recipe-path recipe.json # Now copy everything else over -- we've minimized the set of files that cause a full `rush install` or `cargo build` to run. COPY . . # Build the convex-local-backend binary -RUN --mount=type=cache,target=/convex/npm-packages/common/temp/,sharing=locked --mount=type=cache,target=/convex/target/ <