Skip to content

Commit 4783ee4

Browse files
committed
.
1 parent 72d1a96 commit 4783ee4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
FROM node:22-alpine AS builder
33

44
# Install dependencies
5-
RUN apk add --no-cache libc6-compat
5+
RUN apk add --no-cache libc6-compat python3 make g++
66

77
WORKDIR /app
88

99
# Copy package files
1010
COPY package.json package-lock.json* ./
1111

12-
# Install dependencies
13-
RUN npm install
12+
# Install dependencies with optional dependencies
13+
# The --include=optional flag ensures rollup native binaries are installed
14+
RUN npm install --include=optional || (rm -f package-lock.json && npm install --include=optional)
1415

1516
# Copy source code
1617
COPY . .

0 commit comments

Comments
 (0)