Fix: Usar Debian slim no runtime para compatibilidade Prisma/OpenSSL
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -1,4 +1,4 @@
|
||||
# Build stage
|
||||
# Build stage - Alpine para build rápido
|
||||
FROM node:22-alpine AS base
|
||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
@@ -22,17 +22,17 @@ RUN pnpm prisma generate
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
RUN pnpm build
|
||||
|
||||
# Production stage
|
||||
FROM base AS runner
|
||||
RUN apk add --no-cache openssl openssl-dev libc6-compat
|
||||
# Production stage - Debian para compatibilidade Prisma
|
||||
FROM node:22-slim AS runner
|
||||
RUN apt-get update && apt-get install -y openssl libssl3 ca-certificates && rm -rf /var/lib/apt/lists/*
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
# Create non-root user
|
||||
RUN addgroup --system --gid 1001 nodejs
|
||||
RUN adduser --system --uid 1001 nextjs
|
||||
RUN groupadd --system --gid 1001 nodejs
|
||||
RUN useradd --system --uid 1001 nextjs
|
||||
|
||||
# Copy necessary files
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
Reference in New Issue
Block a user