fix(stats): preserve container dependency lock (#49385)

This commit is contained in:
Adam
2026-09-16 13:15:53 -05:00
committed by GitHub
parent a6183af6f3
commit 88c6c7abc7
+3 -1
View File
@@ -14,10 +14,12 @@ RUN bunx turbo@2.8.13 prune @opencode-ai/stats-server --docker --no-update-notif
FROM base AS installer
COPY --from=pruner /app/out/json/ ./
COPY --from=pruner /app/bun.lock ./bun.lock
# Bun 1.3.x needs the pruned workspace globs and lockfile metadata refreshed before the frozen production install.
RUN bun -e 'const packageJson = await Bun.file("package.json").json(); packageJson.workspaces.packages = Array.from(new Bun.Glob("packages/**/package.json").scanSync(".")).map((file) => file.slice(0, -"/package.json".length)).sort(); await Bun.write("package.json", JSON.stringify(packageJson, null, 2) + "\n")'
RUN rm -f bun.lock && bun install --filter @opencode-ai/stats-server --lockfile-only --ignore-scripts
# Preserve locked transitive versions while refreshing the pruned workspace metadata.
RUN bun install --filter @opencode-ai/stats-server --lockfile-only --ignore-scripts
RUN bun install --filter @opencode-ai/stats-server --frozen-lockfile --production --ignore-scripts
FROM base AS runner