# Host-installed dependencies must never enter an image: postinstall/compile # always run inside the container so linked native modules and generated # artifacts match its OS/arch, not whatever the host happened to build. **/node_modules # Compiled output is regenerated by each package's own compile script # (`clean && build`, which removes it first), so a host checkout's possibly # stale copy only adds build-context weight without being used. packages/*/build packages/*/ts_build .git .idea # `**/` is required for these to match at any depth: unlike .gitignore, # Docker only anchors a bare pattern to the build context root (confirmed # empirically -- a bare `artifacts` here silently let # packages/crypto-rpc/blockchain/EVM/artifacts and cache, Hardhat's own # regenerated compile output, leak into images built from root context). **/artifacts **/cache **/coverage **/.nyc_output .DS_Store # A developer's accumulated runtime logs/pids (wallet-service's own # start-docker.sh writes these; see its own .gitignore) are host state, not # source -- found leaking hundreds of MB into a real `COPY . .` build here, # the same host-state-isolation problem as node_modules above. **/logs **/pids *.log