From a50e5610c3b3b941183cf090ab763dca8b1796d1 Mon Sep 17 00:00:00 2001 From: Justin McLellan Date: Sat, 4 Jul 2026 01:01:16 -0500 Subject: [PATCH] Cache-mount the pnpm store in the Docker build Shares a warm, content-addressable pnpm store (id=pnpm-store) across C4G app builds on the same BuildKit instance, so slow/interrupted installs on the deploy server reuse already-downloaded packages. Co-Authored-By: Claude Opus 4.8 (1M context) --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1ad00ae..ef1da77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,8 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./ # Install dependencies (ignore-scripts skips husky's prepare hook; # native packages such as sharp ship prebuilt binaries so no build step is needed) -RUN pnpm install --frozen-lockfile --ignore-scripts +RUN --mount=type=cache,id=pnpm-store,target=/pnpm/store \ + pnpm install --frozen-lockfile --ignore-scripts --store-dir=/pnpm/store # Copy source code COPY . .