fix(docker): use --ignore-scripts on install, fix pnpm 11 build approval error

This commit is contained in:
2026-06-13 10:41:36 +02:00
parent f12512401c
commit 898a317fc7
3 changed files with 14 additions and 11 deletions
+8 -3
View File
@@ -1,17 +1,19 @@
FROM node:22-alpine AS base
RUN npm install -g pnpm@11.6.0
RUN apk add --no-cache openssl && \
npm install -g pnpm@11.6.0
# ── deps ────────────────────────────────────────────────────────────────────
FROM base AS deps
WORKDIR /app
ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
RUN pnpm install --frozen-lockfile --ignore-scripts
# ── builder ─────────────────────────────────────────────────────────────────
FROM base AS builder
WORKDIR /app
ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x
COPY --from=deps /app/node_modules ./node_modules
COPY .npmrc .
COPY . .
RUN pnpm prisma generate
@@ -23,8 +25,11 @@ RUN pnpm build
FROM node:22-alpine AS runner
WORKDIR /app
RUN apk add --no-cache openssl
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs