From f2575ee3308fe5f9a45db1b6bf304d49b4141fa0 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 1 Jun 2026 23:57:38 +0000 Subject: [PATCH] Add pnpm store cache mount to turbo build steps in Dockerfiles The preinstall hook uses pnpx only-allow which needs the pnpm store. The store is only available during RUN commands with the cache mount. Co-Authored-By: Konstantin Wohlwend --- docker/backend/Dockerfile | 2 +- docker/local-emulator/Dockerfile | 2 +- docker/server/Dockerfile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/backend/Dockerfile b/docker/backend/Dockerfile index d5cbb5202..3bd2bf44a 100644 --- a/docker/backend/Dockerfile +++ b/docker/backend/Dockerfile @@ -55,7 +55,7 @@ COPY docs ./docs ENV NEXT_CONFIG_OUTPUT=standalone # Build backend only -RUN pnpm turbo run docker-build --filter=@hexclave/backend... +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm turbo run docker-build --filter=@hexclave/backend... # Final image diff --git a/docker/local-emulator/Dockerfile b/docker/local-emulator/Dockerfile index 4fcfb4318..ef64164ef 100644 --- a/docker/local-emulator/Dockerfile +++ b/docker/local-emulator/Dockerfile @@ -56,7 +56,7 @@ ENV NEXT_CONFIG_OUTPUT=standalone ENV NEXT_PUBLIC_STACK_STRIPE_PUBLISHABLE_KEY=pk_test_mock_publishable_key_for_local_emulator # Build the backend NextJS app -RUN pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard... +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard... # Build the self-host seed script. # tsdown -> rolldown is multi-threaded Rust; under qemu-user (cross-arch diff --git a/docker/server/Dockerfile b/docker/server/Dockerfile index 62656ea08..828ebd523 100644 --- a/docker/server/Dockerfile +++ b/docker/server/Dockerfile @@ -53,10 +53,10 @@ COPY docs ./docs ENV NEXT_CONFIG_OUTPUT=standalone # Build the backend NextJS app -RUN pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard... +RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm turbo run docker-build --filter=@hexclave/backend... --filter=@hexclave/dashboard... # Build the self-host seed script -RUN cd apps/backend && pnpm build-self-host-migration-script +RUN --mount=type=cache,id=pnpm,target=/pnpm/store cd apps/backend && pnpm build-self-host-migration-script