Fix Docker npm ci by switching build image to Node 20.
Avoid the node:22-alpine crash that fails installs with Exit handler never called. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
FROM docker.arvancloud.ir/node:22-alpine AS build
|
# node:22-alpine npm often dies with "Exit handler never called" in Docker builds.
|
||||||
|
FROM docker.arvancloud.ir/node:20-alpine AS build
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package.json package-lock.json ./
|
COPY package.json package-lock.json ./
|
||||||
RUN --mount=type=cache,target=/root/.npm \
|
RUN npm ci --no-audit --no-fund
|
||||||
npm ci --no-audit --no-fund
|
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user