fix(docker): avoid package node_modules copy conflicts · openclaw/openclaw@ffd212c
vincentkoc
·
2026-05-07
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -48,7 +48,7 @@ COPY --from=openclaw_package --chown=appuser:appuser openclaw-current.tgz /tmp/o
|
48 | 48 | RUN npm install -g --prefix /tmp/openclaw-prefix /tmp/openclaw-current.tgz --no-fund --no-audit \ |
49 | 49 | && mkdir -p /app/node_modules \ |
50 | 50 | && cp -a /tmp/openclaw-prefix/lib/node_modules/. /app/node_modules/ \ |
51 | | -&& cp -a /tmp/openclaw-prefix/lib/node_modules/openclaw/. /app/ \ |
| 51 | +&& find /tmp/openclaw-prefix/lib/node_modules/openclaw -mindepth 1 -maxdepth 1 ! -name node_modules -exec cp -a {} /app/ \; \ |
52 | 52 | && mkdir -p "$HOME/.local/bin" \ |
53 | 53 | && ln -sf /app/openclaw.mjs "$HOME/.local/bin/openclaw" \ |
54 | 54 | && rm -rf /app/node_modules/openclaw \ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -116,6 +116,9 @@ describe("docker build cache layout", () => {
|
116 | 116 | expect(dockerfile).toContain( |
117 | 117 | "cp -a /tmp/openclaw-prefix/lib/node_modules/. /app/node_modules/", |
118 | 118 | ); |
| 119 | +expect(dockerfile).toContain( |
| 120 | +"find /tmp/openclaw-prefix/lib/node_modules/openclaw -mindepth 1 -maxdepth 1 ! -name node_modules", |
| 121 | +); |
119 | 122 | expect(dockerfile).toContain("rm -rf /app/node_modules/openclaw"); |
120 | 123 | expect(dockerfile).toContain("ln -sf /app /app/node_modules/openclaw"); |
121 | 124 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。