Skip to content

Commit 2b62eeb

Browse files
feat: update openclaw Dockerfile
1 parent ac4ec25 commit 2b62eeb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

openclaw/Dockerfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ RUN corepack enable
6262
WORKDIR /app
6363

6464
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc ./
65+
COPY openclaw.mjs ./
6566
COPY ui/package.json ./ui/package.json
6667
COPY patches ./patches
67-
COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs ./scripts/
68+
COPY scripts/postinstall-bundled-plugins.mjs scripts/npm-runner.mjs scripts/windows-cmd-helpers.mjs ./scripts/
6869

6970
COPY --from=ext-deps /out/ ./${OPENCLAW_BUNDLED_PLUGIN_DIR}/
7071

@@ -103,9 +104,15 @@ RUN pnpm qa:lab:build
103104
# Prune dev dependencies and strip build-only metadata before copying
104105
# runtime assets into the final image.
105106
FROM build AS runtime-assets
107+
ARG OPENCLAW_EXTENSIONS
106108
ARG OPENCLAW_BUNDLED_PLUGIN_DIR
107109
ARG OPENCLAW_EXCLUDE_BUNDLED_PLUGINS
108-
RUN CI=true pnpm prune --prod && \
110+
RUN printf 'packages:\n - .\n - ui\n' > /tmp/pnpm-workspace.runtime.yaml && \
111+
for ext in $OPENCLAW_EXTENSIONS; do \
112+
printf ' - %s/%s\n' "$OPENCLAW_BUNDLED_PLUGIN_DIR" "$ext" >> /tmp/pnpm-workspace.runtime.yaml; \
113+
done && \
114+
cp /tmp/pnpm-workspace.runtime.yaml pnpm-workspace.yaml && \
115+
CI=true NPM_CONFIG_FROZEN_LOCKFILE=false pnpm prune --prod && \
109116
for plugin in $OPENCLAW_EXCLUDE_BUNDLED_PLUGINS; do \
110117
if [ -n "$plugin" ]; then \
111118
rm -rf "${OPENCLAW_BUNDLED_PLUGIN_DIR}/$plugin"; \

0 commit comments

Comments
 (0)