Skip to content

Commit 88c6c7a

Browse files
authored
fix(stats): preserve container dependency lock (anomalyco#49385)
1 parent a6183af commit 88c6c7a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/stats/server/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ RUN bunx turbo@2.8.13 prune @opencode-ai/stats-server --docker --no-update-notif
1414
FROM base AS installer
1515

1616
COPY --from=pruner /app/out/json/ ./
17+
COPY --from=pruner /app/bun.lock ./bun.lock
1718

1819
# Bun 1.3.x needs the pruned workspace globs and lockfile metadata refreshed before the frozen production install.
1920
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")'
20-
RUN rm -f bun.lock && bun install --filter @opencode-ai/stats-server --lockfile-only --ignore-scripts
21+
# Preserve locked transitive versions while refreshing the pruned workspace metadata.
22+
RUN bun install --filter @opencode-ai/stats-server --lockfile-only --ignore-scripts
2123
RUN bun install --filter @opencode-ai/stats-server --frozen-lockfile --production --ignore-scripts
2224

2325
FROM base AS runner

0 commit comments

Comments
 (0)