From 79272e1bd86af46523f735a7487114381d78df67 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 1 Mar 2026 19:04:55 -0600 Subject: [PATCH] fix(ci): copy .npmrc before pnpm install in all Dockerfiles The .npmrc file contains supportedArchitectures settings to force pnpm to install glibc x64 binaries for native modules like matrix-sdk-crypto-nodejs. Without copying this file into the Docker image, pnpm defaults to the platform's native behavior which may skip or install incorrect binaries. --- apps/api/Dockerfile | 3 +++ apps/orchestrator/Dockerfile | 3 +++ apps/web/Dockerfile | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 7a9d27b..8982b3a 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -30,6 +30,9 @@ COPY packages/ui/package.json ./packages/ui/ COPY packages/config/package.json ./packages/config/ COPY apps/api/package.json ./apps/api/ +# Copy npm configuration for native binary architecture hints +COPY .npmrc ./ + # Install dependencies (no cache mount — Kaniko builds are ephemeral in CI) # Then explicitly rebuild node-pty from source since pnpm may skip postinstall # scripts or fail to find prebuilt binaries for this Node.js version diff --git a/apps/orchestrator/Dockerfile b/apps/orchestrator/Dockerfile index d3fc408..96fcf31 100644 --- a/apps/orchestrator/Dockerfile +++ b/apps/orchestrator/Dockerfile @@ -22,6 +22,9 @@ COPY packages/shared/package.json ./packages/shared/ COPY packages/config/package.json ./packages/config/ COPY apps/orchestrator/package.json ./apps/orchestrator/ +# Copy npm configuration for native binary architecture hints +COPY .npmrc ./ + # Install ALL dependencies (not just production) # No cache mount — Kaniko builds are ephemeral in CI RUN pnpm install --frozen-lockfile diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index ab37503..ecc960d 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -24,6 +24,9 @@ COPY packages/ui/package.json ./packages/ui/ COPY packages/config/package.json ./packages/config/ COPY apps/web/package.json ./apps/web/ +# Copy npm configuration for native binary architecture hints +COPY .npmrc ./ + # Install dependencies (no cache mount — Kaniko builds are ephemeral in CI) RUN pnpm install --frozen-lockfile @@ -38,6 +41,9 @@ COPY packages/ui/package.json ./packages/ui/ COPY packages/config/package.json ./packages/config/ COPY apps/web/package.json ./apps/web/ +# Copy npm configuration for native binary architecture hints +COPY .npmrc ./ + # Install production dependencies only RUN pnpm install --frozen-lockfile --prod -- 2.49.1