diff --git a/Dockerfile b/Dockerfile index ec7378c..3aee0aa 100644 --- a/Dockerfile +++ b/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