fix(docker): set NPM_CONFIG_LEGACY_PEER_DEPS and remove duplicate COPY (#1630)

Cherry-pick from PR #1630 by @rdself. Fixes Docker build failures caused by
lockfile peer dependency mismatch during npm ci.
This commit is contained in:
diegosouzapw
2026-04-26 16:09:25 -03:00
parent 6df01aeb34
commit 71745820ed

View File

@@ -9,7 +9,7 @@ COPY package*.json ./
COPY scripts/postinstall.mjs ./scripts/postinstall.mjs
COPY scripts/postinstallSupport.mjs ./scripts/postinstallSupport.mjs
COPY scripts/native-binary-compat.mjs ./scripts/native-binary-compat.mjs
COPY scripts/postinstallSupport.mjs ./scripts/postinstallSupport.mjs
ENV NPM_CONFIG_LEGACY_PEER_DEPS=true
RUN if [ -f package-lock.json ]; then npm ci --no-audit --no-fund; else npm install --no-audit --no-fund; fi
COPY . ./