mirror of
https://github.com/Gloridust/WechatOnCloud.git
synced 2026-08-30 18:21:27 -07:00
Dockerfile 的 COPY web/ ./ 与 COPY server/ ./ 会把构建上下文里的 node_modules 一并拷入, 若宿主先前在本地装过依赖(如 macOS),其平台特定二进制(@esbuild/darwin-arm64)会覆盖镜像内 npm install 的 Linux 依赖 → tsx/esbuild 报 "Host version ... does not match binary version" 起不来。 加 .dockerignore 排除 **/node_modules(及 web/dist 等),保证本地构建与 CI(干净 checkout)一致。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
10 lines
515 B
Plaintext
10 lines
515 B
Plaintext
# 构建上下文为 ./panel。务必排除宿主的 node_modules:否则 `COPY web/ ./` / `COPY server/ ./`
|
||
# 会把宿主(如 macOS)平台特定的二进制(esbuild/@esbuild/*)拷进 Linux 镜像,覆盖镜像内 npm install
|
||
# 的干净依赖 → tsx/esbuild 报 "Host version ... does not match binary version" 而起不来。
|
||
# (CI 是干净 checkout、本无 node_modules 不受影响;此文件保证本地构建也干净、与 CI 一致。)
|
||
**/node_modules
|
||
web/dist
|
||
**/.DS_Store
|
||
**/*.log
|
||
.git
|