fix(release): preserve Docker package runtime deps

This commit is contained in:
Peter Steinberger
2026-05-01 21:05:10 +01:00
parent cb4cdaf710
commit 569e1ea070
3 changed files with 10 additions and 1 deletions

View File

@@ -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