Fix Dockerfile: use Alpine 3.18 with OpenSSL 1.1 compat for Prisma
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
4a24b072a1
commit
9fcf5246e8
|
|
@ -1,8 +1,8 @@
|
|||
FROM node:20-alpine AS base
|
||||
FROM node:20-alpine3.18 AS base
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM base AS deps
|
||||
RUN apk add --no-cache libc6-compat openssl
|
||||
RUN apk add --no-cache libc6-compat openssl1.1-compat
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies
|
||||
|
|
@ -18,6 +18,7 @@ RUN npx prisma generate
|
|||
|
||||
# Rebuild the source code only when needed
|
||||
FROM base AS builder
|
||||
RUN apk add --no-cache openssl1.1-compat
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
|
@ -34,6 +35,7 @@ RUN npm run build
|
|||
|
||||
# Production image, copy all the files and run next
|
||||
FROM base AS runner
|
||||
RUN apk add --no-cache openssl1.1-compat
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
|
|
|||
Loading…
Reference in New Issue