fix: isolate frontend node_modules in Docker volume to prevent cross-platform conflicts
npm install pulls platform-specific native binaries (esbuild, rollup). Without isolation, building on macOS writes macOS node_modules into the bind mount, then the Linux container tries to execute them and fails. The Docker volume gives each platform its own node_modules. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -69,6 +69,16 @@ services:
|
|||||||
- workspace-target:/workspace/target
|
- workspace-target:/workspace/target
|
||||||
- huskies-target:/app/target
|
- huskies-target:/app/target
|
||||||
|
|
||||||
|
# Isolate frontend node_modules from the host.
|
||||||
|
# npm install pulls platform-specific native binaries (esbuild,
|
||||||
|
# rollup, etc.) — macOS binaries won't run on Linux and vice versa.
|
||||||
|
# Without this volume, building on the Mac host writes macOS
|
||||||
|
# node_modules into the bind mount, then the Linux container tries
|
||||||
|
# to execute them and fails. The Docker volume gives the container
|
||||||
|
# its own Linux-native node_modules that doesn't collide with the
|
||||||
|
# host's.
|
||||||
|
- frontend-modules:/workspace/frontend/node_modules
|
||||||
|
|
||||||
# ── Security hardening ──────────────────────────────────────────
|
# ── Security hardening ──────────────────────────────────────────
|
||||||
# Read-only root filesystem. Only explicitly mounted volumes and
|
# Read-only root filesystem. Only explicitly mounted volumes and
|
||||||
# tmpfs paths are writable.
|
# tmpfs paths are writable.
|
||||||
@@ -130,3 +140,4 @@ volumes:
|
|||||||
claude-state:
|
claude-state:
|
||||||
workspace-target:
|
workspace-target:
|
||||||
huskies-target:
|
huskies-target:
|
||||||
|
frontend-modules:
|
||||||
|
|||||||
Reference in New Issue
Block a user