fix: switch to npm for docker build

This commit is contained in:
Manohar Gupta 2026-05-10 04:00:09 +05:30
parent 7d50128d94
commit 7e2cb39d9b
3 changed files with 5267 additions and 7 deletions

1
.npmrc
View file

@ -1 +0,0 @@
enable-pre-post-scripts=true

View file

@ -1,18 +1,17 @@
# Stage 1: Install dependencies # Stage 1: Install dependencies
FROM node:22-alpine AS deps FROM node:22-alpine AS deps
RUN corepack enable && apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
COPY package.json pnpm-lock.yaml ./ COPY package.json package-lock.json ./
COPY .npmrc ./ RUN npm ci
RUN pnpm install --frozen-lockfile
# Stage 2: Build the app # Stage 2: Build the app
FROM node:22-alpine AS builder FROM node:22-alpine AS builder
RUN corepack enable && apk add --no-cache libc6-compat openssl RUN apk add --no-cache libc6-compat openssl
WORKDIR /app WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .
RUN pnpm build RUN npm run build
# Stage 3: Production runner # Stage 3: Production runner
FROM node:22-alpine AS runner FROM node:22-alpine AS runner

5262
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff