From 8c9e1a76d1668be26840bbf4b801a6180fcb793a Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Tue, 2 Dec 2025 12:46:31 +0000 Subject: [PATCH] Fix Prisma client generation for correct platform - Skip Prisma postinstall during npm ci with --ignore-scripts - Generate Prisma client explicitly in builder stage - Ensures correct binary for Debian/Linux platform --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index cd46e18..e50246f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,8 @@ WORKDIR /app # Copy package files COPY package.json package-lock.json* ./ -RUN npm ci +# Install dependencies but skip Prisma postinstall +RUN npm ci --ignore-scripts # Rebuild the source code only when needed FROM base AS builder @@ -17,8 +18,8 @@ WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -# Generate Prisma Client -RUN npx prisma generate +# Generate Prisma Client for the correct platform (Debian) +RUN npx prisma generate --generator client # Build Next.js application ENV NEXT_TELEMETRY_DISABLED 1