fix(docker): prevent pnpm TTY prompt when BuildKit cache has stale node_modules
pnpm 11 aborts with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY when it detects an existing node_modules directory and there is no TTY to confirm purging it. This happens in Portainer when BuildKit layer cache reuses a prior deps stage containing node_modules. - .npmrc: set confirmModulesPurge=false (skip prompt unconditionally) - Dockerfile deps stage: set CI=true (belt-and-suspenders for pnpm CI mode) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -3,3 +3,4 @@ onlyBuiltDependencies[]=core-js
|
|||||||
onlyBuiltDependencies[]=prisma
|
onlyBuiltDependencies[]=prisma
|
||||||
onlyBuiltDependencies[]=sharp
|
onlyBuiltDependencies[]=sharp
|
||||||
onlyBuiltDependencies[]=unrs-resolver
|
onlyBuiltDependencies[]=unrs-resolver
|
||||||
|
confirmModulesPurge=false
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ RUN apk add --no-cache openssl && \
|
|||||||
FROM base AS deps
|
FROM base AS deps
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x
|
ENV PRISMA_CLI_BINARY_TARGETS=linux-musl-openssl-3.0.x
|
||||||
|
ENV CI=true
|
||||||
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
COPY .npmrc package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||||
RUN pnpm install --frozen-lockfile --ignore-scripts
|
RUN pnpm install --frozen-lockfile --ignore-scripts
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user