mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
fix(docker): materialize ai runtime package
This commit is contained in:
parent
824d8af0d6
commit
57ca1b0254
2 changed files with 10 additions and 0 deletions
|
|
@ -153,6 +153,14 @@ RUN --mount=type=cache,id=openclaw-pnpm-store,target=/root/.local/share/pnpm/sto
|
|||
OPENCLAW_EXTENSIONS="$OPENCLAW_EXTENSIONS" OPENCLAW_BUNDLED_PLUGIN_DIR="$OPENCLAW_BUNDLED_PLUGIN_DIR" node scripts/prune-docker-plugin-dist.mjs && \
|
||||
node scripts/postinstall-bundled-plugins.mjs && \
|
||||
find dist -type f \( -name '*.d.ts' -o -name '*.d.mts' -o -name '*.d.cts' -o -name '*.map' \) -delete && \
|
||||
if [ -L /app/node_modules/@openclaw/ai ]; then \
|
||||
ai_runtime_target="$(readlink -f /app/node_modules/@openclaw/ai)" && \
|
||||
ai_runtime_tmp="$(mktemp -d)" && \
|
||||
cp -a "$ai_runtime_target" "$ai_runtime_tmp/ai" && \
|
||||
rm /app/node_modules/@openclaw/ai && \
|
||||
mv "$ai_runtime_tmp/ai" /app/node_modules/@openclaw/ai && \
|
||||
rmdir "$ai_runtime_tmp"; \
|
||||
fi && \
|
||||
rm -rf \
|
||||
/app/node_modules/openclaw \
|
||||
/app/node_modules/.bin/openclaw \
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ describe("Dockerfile", () => {
|
|||
expect(dockerfile).toContain(
|
||||
'OPENCLAW_EXTENSIONS="$OPENCLAW_EXTENSIONS" OPENCLAW_BUNDLED_PLUGIN_DIR="$OPENCLAW_BUNDLED_PLUGIN_DIR" node scripts/prune-docker-plugin-dist.mjs',
|
||||
);
|
||||
expect(dockerfile).toContain("readlink -f /app/node_modules/@openclaw/ai");
|
||||
expect(dockerfile).toContain('mv "$ai_runtime_tmp/ai" /app/node_modules/@openclaw/ai');
|
||||
expect(dockerfile).toContain("CI=true pnpm prune --prod \\");
|
||||
expect(dockerfile.indexOf("CI=true pnpm prune --prod \\")).toBeLessThan(
|
||||
dockerfile.indexOf(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue