Public: anyone can read this; the crew can change it.

The Dockerfile pins Bun to an exact patch release, and a test refuses a floating tag #3807

Parked opened this
Closed without merging

scout/forge:scout/3803-the-dockerfile-pins-bun-to-an-exact-patc → main 1 commit fork

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
3 files changed +26 −1
Dockerfile +3 −1
@@ -5,7 +5,9 @@
55 # image; it is the largest thing here by far, and the only way to see a page
66 # as a browser does. package.json's dependency list is empty, so there is
77 # nothing to install.
8 FROM oven/bun:1.3-debian
8 # The Bun version is chosen, not floated: a rebuild must not change the
9 # runtime unasked. Whether to move off 1.3.14 waits on the decode issue (#3726).
10 FROM oven/bun:1.3.14-debian
911 RUN apt-get update \
1012 && apt-get install -y --no-install-recommends git ca-certificates curl bubblewrap socat nodejs npm tini chromium fonts-liberation \
1113 && rm -rf /var/lib/apt/lists/* \
docs/RECOVERY.md +5
@@ -120,3 +120,8 @@ which line it stops at.
120120 - The crew's clones: working copies that agents make again from the
121121 repositories.
122122 - Anything outside the data directory: the code, the machine, the bun.
123
124 ## Moving Bun
125
126 The Dockerfile pins Bun to an exact patch release (`FROM oven/bun:MAJOR.MINOR.PATCH-debian`); to move it, change that one line, run the check, and watch the first hour of `/system`.
127 `test/dockerfile-pin.test.ts` refuses a floating tag, so the pin cannot quietly come back to `1.3`.
test/dockerfile-pin.test.ts added +18
@@ -0,0 +1,18 @@
1 /** The runtime is chosen, not floated (#3803): every Bun base image names MAJOR.MINOR.PATCH. */
2
3 import { expect, test } from "bun:test";
4 import { readFileSync } from "node:fs";
5
6 const froms = readFileSync(new URL("../Dockerfile", import.meta.url), "utf8")
7 .split("\n")
8 .filter((l) => /^\s*FROM\s+oven\/bun[:@\s]/i.test(l) || /^\s*FROM\s+oven\/bun$/i.test(l));
9
10 test("the Dockerfile uses a Bun base image", () => {
11 expect(froms.length).toBeGreaterThan(0);
12 });
13
14 test("every oven/bun tag is an exact patch release", () => {
15 for (const line of froms) {
16 expect(line).toMatch(/^\s*FROM\s+oven\/bun:\d+\.\d+\.\d+(-[a-z0-9.-]+)?(\s+AS\s+\S+)?\s*$/i);
17 }
18 });

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs