fix(docker): seed offline prune store in runtime stage

This commit is contained in:
Peter Steinberger
2026-05-22 16:58:07 +01:00
parent 21bedd3964
commit faf2a6cb9e

View File

@@ -72,8 +72,7 @@ RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/sto
NODE_OPTIONS=--max-old-space-size=2048 pnpm install --frozen-lockfile \
--config.supportedArchitectures.os=linux \
--config.supportedArchitectures.cpu="$(node -p 'process.arch')" \
--config.supportedArchitectures.libc=glibc && \
pnpm store add source-map@0.6.1
--config.supportedArchitectures.libc=glibc
# pnpm v10+ may append peer-resolution hashes to virtual-store folder names; do not hardcode `.pnpm/...`
# paths. Matrix's native downloader can hit transient release CDN errors while
@@ -122,7 +121,10 @@ RUN pnpm_config_verify_deps_before_run=false pnpm qa:lab:build
FROM build AS runtime-assets
ARG OPENCLAW_EXTENSIONS
ARG OPENCLAW_BUNDLED_PLUGIN_DIR
# BuildKit cache mounts are not part of cached layers; seed prune-only
# tarballs in the same step that runs offline prune.
RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/store,sharing=locked \
pnpm store add source-map@0.6.1 && \
CI=true pnpm prune --prod \
--config.offline=true \
--config.supportedArchitectures.os=linux \