mirror of
https://github.com/anomalyco/opencode.git
synced 2026-09-28 05:23:19 +08:00
fix(stats): preserve container dependency lock (#49385)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user