From 9ebb2786b3b04d7b2242cf19162a9911401eea33 Mon Sep 17 00:00:00 2001 From: Paul Bailey Date: Tue, 2 Dec 2025 12:28:40 +0000 Subject: [PATCH] Fix Prisma OpenSSL compatibility for Alpine Docker - Add openssl package to all Docker build stages - Ensures Prisma engine works on Alpine Linux ARM64 - Fixes libssl.so.1.1 missing library error --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index e38ef79..eb2022f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM node:20-alpine AS base # Install dependencies only when needed FROM base AS deps -RUN apk add --no-cache libc6-compat +RUN apk add --no-cache libc6-compat openssl WORKDIR /app # Copy package files @@ -12,11 +12,12 @@ RUN npm ci # Rebuild the source code only when needed FROM base AS builder +RUN apk add --no-cache openssl WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -# Generate Prisma Client +# Generate Prisma Client for Alpine Linux RUN npx prisma generate # Build Next.js application @@ -25,6 +26,7 @@ RUN npm run build # Production image, copy all the files and run next FROM base AS runner +RUN apk add --no-cache openssl WORKDIR /app ENV NODE_ENV production