Skip to content

Commit df0cf18

Browse files
committed
fix(docker): delete lockfile during build to force linux binary resolution
1 parent e8427ef commit df0cf18

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ FROM node:20-slim AS builder
33

44
WORKDIR /app
55

6-
# Copy package files
7-
COPY package.json package-lock.json ./
86

9-
# Use 'install' instead of 'ci' to force resolution of Linux native bindings
10-
RUN npm install --legacy-peer-deps
7+
# Copy package.json only (ignore lockfile for build to fix native deps)
8+
COPY package.json ./
9+
10+
# Delete lockfile to force Linux native binary resolution
11+
RUN rm -f package-lock.json && npm install --legacy-peer-deps
1112

1213
# Copy source
1314
COPY . .

0 commit comments

Comments
 (0)