fix(release): preserve Docker package runtime deps · openclaw/openclaw@569e1ea
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -46,10 +46,12 @@ COPY --from=openclaw_package --chown=appuser:appuser openclaw-current.tgz /tmp/o
|
46 | 46 | # Preserve package self-reference imports such as openclaw/plugin-sdk/* after |
47 | 47 | # copying the installed package out of npm's global node_modules tree. |
48 | 48 | RUN npm install -g --prefix /tmp/openclaw-prefix /tmp/openclaw-current.tgz --no-fund --no-audit \ |
| 49 | +&& mkdir -p /app/node_modules \ |
| 50 | +&& cp -a /tmp/openclaw-prefix/lib/node_modules/. /app/node_modules/ \ |
49 | 51 | && cp -a /tmp/openclaw-prefix/lib/node_modules/openclaw/. /app/ \ |
50 | 52 | && mkdir -p "$HOME/.local/bin" \ |
51 | 53 | && ln -sf /app/openclaw.mjs "$HOME/.local/bin/openclaw" \ |
52 | | -&& mkdir -p /app/node_modules \ |
| 54 | +&& rm -rf /app/node_modules/openclaw \ |
53 | 55 | && ln -sf /app /app/node_modules/openclaw \ |
54 | 56 | && rm -rf /tmp/openclaw-prefix /tmp/openclaw-current.tgz |
55 | 57 | |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -113,6 +113,11 @@ describe("docker build cache layout", () => {
|
113 | 113 | expect(dockerfile).toContain( |
114 | 114 | "npm install -g --prefix /tmp/openclaw-prefix /tmp/openclaw-current.tgz --no-fund --no-audit", |
115 | 115 | ); |
| 116 | +expect(dockerfile).toContain( |
| 117 | +"cp -a /tmp/openclaw-prefix/lib/node_modules/. /app/node_modules/", |
| 118 | +); |
| 119 | +expect(dockerfile).toContain("rm -rf /app/node_modules/openclaw"); |
| 120 | +expect(dockerfile).toContain("ln -sf /app /app/node_modules/openclaw"); |
116 | 121 | }); |
117 | 122 | |
118 | 123 | it("copies manifests before install in the qr-import image", async () => { |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -252,6 +252,8 @@ function buildDockerE2eHarnessEntries(): Record<string, string> {
|
252 | 252 | "src/agents/pi-embedded-runner/run/runtime-context-prompt.ts", |
253 | 253 | "auto-reply/reply/commands-crestodian": "src/auto-reply/reply/commands-crestodian.ts", |
254 | 254 | "cli/run-main": "src/cli/run-main.ts", |
| 255 | +"commitments/runtime": "src/commitments/runtime.ts", |
| 256 | +"commitments/store": "src/commitments/store.ts", |
255 | 257 | "config/config": "src/config/config.ts", |
256 | 258 | "crestodian/crestodian": "src/crestodian/crestodian.ts", |
257 | 259 | "crestodian/rescue-message": "src/crestodian/rescue-message.ts", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。