diff --git a/Dockerfile b/Dockerfile index d3f1c52..1a396bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # Base image FROM node:20-alpine AS base +RUN apk add --no-cache libc6-compat openssl # Install dependencies only when needed FROM base AS deps -RUN apk add --no-cache libc6-compat WORKDIR /app # Install dependencies @@ -12,7 +12,6 @@ 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 . . @@ -28,8 +27,6 @@ FROM base AS runner WORKDIR /app ENV NODE_ENV production -# Install openssl for Prisma -RUN apk add --no-cache openssl RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs diff --git a/admin/Dockerfile b/admin/Dockerfile index c4611d0..ecb1688 100644 --- a/admin/Dockerfile +++ b/admin/Dockerfile @@ -1,9 +1,9 @@ # Base image FROM node:20-alpine AS base +RUN apk add --no-cache libc6-compat openssl # Install dependencies only when needed FROM base AS deps -RUN apk add --no-cache libc6-compat WORKDIR /app # Install dependencies @@ -12,7 +12,6 @@ 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 . . @@ -28,8 +27,6 @@ FROM base AS runner WORKDIR /app ENV NODE_ENV production -# Install openssl for Prisma -RUN apk add --no-cache openssl RUN addgroup --system --gid 1001 nodejs RUN adduser --system --uid 1001 nextjs