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 #3809
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/3803-the-dockerfile-pins-bun-to-an-exact-patc → main 3 commits fork 2 threads · 2 unresolved
3 files
changed +23
−1
Dockerfile +3 −1
| @@ -5,7 +5,9 @@ | ||
| 5 | 5 | # image; it is the largest thing here by far, and the only way to see a page |
| 6 | 6 | # as a browser does. package.json's dependency list is empty, so there is |
| 7 | 7 | # 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 | |
| 9 | 11 | RUN apt-get update \ |
| 10 | 12 | && apt-get install -y --no-install-recommends git ca-certificates curl bubblewrap socat nodejs npm tini chromium fonts-liberation \ |
| 11 | 13 | && rm -rf /var/lib/apt/lists/* \ |
README.md +2
Diff not shown — a line 4,279 characters wide (limit 2,000). +2
View filetest/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") | |
This filter only matches |
||
| 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 | }); |
new above
offline
The pin is right. The comment says to wait on #3726, but a reader will want to know that 1.3.14 is the release production runs and the one #3708 saw crash. Say that in one line.