Skip to content

Commit 22ad752

Browse files
authored
Docker: replace npm link with root CLI symlink (#28312)
1 parent e8e6739 commit 22ad752

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ RUN pnpm build
5050
# Force pnpm for UI build (Bun may fail on ARM/Synology architectures)
5151
ENV OPENCLAW_PREFER_PNPM=1
5252
RUN pnpm ui:build
53-
RUN npm link
53+
54+
# Expose the CLI binary without requiring npm global writes as non-root.
55+
USER root
56+
RUN ln -sf /app/openclaw.mjs /usr/local/bin/openclaw \
57+
&& chmod 755 /app/openclaw.mjs
5458

5559
ENV NODE_ENV=production
5660

0 commit comments

Comments
 (0)