Docker: replace npm link with root CLI symlink (#28312)

This commit is contained in:
Vincent Koc
2026-02-26 23:57:28 -05:00
committed by GitHub
parent e8e673992a
commit 22ad7523f1

View File

@@ -50,7 +50,11 @@ RUN pnpm build
# Force pnpm for UI build (Bun may fail on ARM/Synology architectures)
ENV OPENCLAW_PREFER_PNPM=1
RUN pnpm ui:build
RUN npm link
# Expose the CLI binary without requiring npm global writes as non-root.
USER root
RUN ln -sf /app/openclaw.mjs /usr/local/bin/openclaw \
&& chmod 755 /app/openclaw.mjs
ENV NODE_ENV=production