Fix Docker build failure: copy postinstall patch script into build context

The .dockerignore excluded the scripts/ directory, so
scripts/patch-bundled-deps.sh was missing during npm install in the
base-node-deps Docker image. This caused the postinstall hook to fail
with "No such file or directory" on every retry.

- Whitelist scripts/patch-bundled-deps.sh in .dockerignore
- Add COPY for the script in Dockerfile.node-deps before npm install

https://claude.ai/code/session_01LsQx9CLjseJn72Sup32Dwm
This commit is contained in:
Claude
2026-03-12 07:28:14 +00:00
parent 45daa18bb1
commit 3bb4349f0b
2 changed files with 6 additions and 0 deletions

View File

@@ -96,6 +96,9 @@ mojo
spec
scripts
.claude
# Allow postinstall patch script for node-deps base image
!scripts/patch-bundled-deps.sh
dist
# Allow specific dbal paths through for app builds

View File

@@ -51,6 +51,9 @@ COPY translations/package.json ./translations/
COPY types/package.json ./types/
COPY workflow/package.json ./workflow/
# Postinstall patch script (patches vulnerable bundled deps in npm)
COPY scripts/patch-bundled-deps.sh ./scripts/
# Install all workspace deps (generates lock file from package.json manifests)
RUN npm config set fetch-retries 5 \
&& npm config set fetch-retry-mintimeout 20000 \