fix: switch to npm for docker build
This commit is contained in:
parent
7d50128d94
commit
7e2cb39d9b
3 changed files with 5267 additions and 7 deletions
1
.npmrc
1
.npmrc
|
|
@ -1 +0,0 @@
|
|||
enable-pre-post-scripts=true
|
||||
11
Dockerfile
11
Dockerfile
|
|
@ -1,18 +1,17 @@
|
|||
# Stage 1: Install dependencies
|
||||
FROM node:22-alpine AS deps
|
||||
RUN corepack enable && apk add --no-cache libc6-compat
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
COPY .npmrc ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
|
||||
# Stage 2: Build the app
|
||||
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
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
RUN pnpm build
|
||||
RUN npm run build
|
||||
|
||||
# Stage 3: Production runner
|
||||
FROM node:22-alpine AS runner
|
||||
|
|
|
|||
5262
package-lock.json
generated
Normal file
5262
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue