mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 05:40:44 +00:00
fix(release): preserve Docker package runtime deps
This commit is contained in:
@@ -46,10 +46,12 @@ COPY --from=openclaw_package --chown=appuser:appuser openclaw-current.tgz /tmp/o
|
||||
# Preserve package self-reference imports such as openclaw/plugin-sdk/* after
|
||||
# copying the installed package out of npm's global node_modules tree.
|
||||
RUN npm install -g --prefix /tmp/openclaw-prefix /tmp/openclaw-current.tgz --no-fund --no-audit \
|
||||
&& mkdir -p /app/node_modules \
|
||||
&& cp -a /tmp/openclaw-prefix/lib/node_modules/. /app/node_modules/ \
|
||||
&& cp -a /tmp/openclaw-prefix/lib/node_modules/openclaw/. /app/ \
|
||||
&& mkdir -p "$HOME/.local/bin" \
|
||||
&& ln -sf /app/openclaw.mjs "$HOME/.local/bin/openclaw" \
|
||||
&& mkdir -p /app/node_modules \
|
||||
&& rm -rf /app/node_modules/openclaw \
|
||||
&& ln -sf /app /app/node_modules/openclaw \
|
||||
&& rm -rf /tmp/openclaw-prefix /tmp/openclaw-current.tgz
|
||||
|
||||
|
||||
@@ -113,6 +113,11 @@ describe("docker build cache layout", () => {
|
||||
expect(dockerfile).toContain(
|
||||
"npm install -g --prefix /tmp/openclaw-prefix /tmp/openclaw-current.tgz --no-fund --no-audit",
|
||||
);
|
||||
expect(dockerfile).toContain(
|
||||
"cp -a /tmp/openclaw-prefix/lib/node_modules/. /app/node_modules/",
|
||||
);
|
||||
expect(dockerfile).toContain("rm -rf /app/node_modules/openclaw");
|
||||
expect(dockerfile).toContain("ln -sf /app /app/node_modules/openclaw");
|
||||
});
|
||||
|
||||
it("copies manifests before install in the qr-import image", async () => {
|
||||
|
||||
@@ -252,6 +252,8 @@ function buildDockerE2eHarnessEntries(): Record<string, string> {
|
||||
"src/agents/pi-embedded-runner/run/runtime-context-prompt.ts",
|
||||
"auto-reply/reply/commands-crestodian": "src/auto-reply/reply/commands-crestodian.ts",
|
||||
"cli/run-main": "src/cli/run-main.ts",
|
||||
"commitments/runtime": "src/commitments/runtime.ts",
|
||||
"commitments/store": "src/commitments/store.ts",
|
||||
"config/config": "src/config/config.ts",
|
||||
"crestodian/crestodian": "src/crestodian/crestodian.ts",
|
||||
"crestodian/rescue-message": "src/crestodian/rescue-message.ts",
|
||||
|
||||
Reference in New Issue
Block a user