Commit c239f03
perf(core): Write CI image tarballs straight from BuildKit (no-changelog)
The e2e image path made four passes over ~3GB to produce one file: bake
exported an OCI tarball, streamed it to dockerd, dockerd unpacked it into
overlay2, then `docker save` read it back out and piped it through zstd.
BuildKit writes the docker-archive directly instead. `compression=zstd`
compresses the layers inside the archive, so the separate compression pass goes
away too - the file is cache-ready as written, and `docker load` handles the
decompression on the other side.
This lands on prepare-docker, which runs ~1000-1400x/week and is the most
frequent Docker job in CI.
Output is one archive per target in DOCKER_BUILD_TARBALL_DIR, so the cache
entry becomes a directory and the variable target count (distroless, pc) needs
no special casing. The pc variant loads its archive before asserting pointer
compression, since nothing reaches the daemon implicitly any more.
Trade-off: with no images in the daemon, `docker images` cannot report a size,
so the e2e docker-image-size metric stops being emitted. Left as Unknown rather
than substituted with the compressed archive size, which would silently change
what the metric means. That image is built with INCLUDE_TEST_CONTROLLER=true
and was never the shipped artifact, so image size belongs on the release path.
Verified locally: bake writes n8n.tar (327M) and runners.tar (162M) with the
expected RepoTags, and `docker load -i` restores a working image.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent f488323 commit c239f03
3 files changed
Lines changed: 36 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
53 | | - | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | | - | |
57 | | - | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
45 | 50 | | |
46 | 51 | | |
47 | 52 | | |
| |||
138 | 143 | | |
139 | 144 | | |
140 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
144 | | - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
145 | 162 | | |
146 | 163 | | |
147 | 164 | | |
| 165 | + | |
148 | 166 | | |
149 | 167 | | |
150 | 168 | | |
| |||
200 | 218 | | |
201 | 219 | | |
202 | 220 | | |
| 221 | + | |
| 222 | + | |
203 | 223 | | |
204 | 224 | | |
205 | 225 | | |
| |||
216 | 236 | | |
217 | 237 | | |
218 | 238 | | |
219 | | - | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
220 | 243 | | |
221 | 244 | | |
222 | 245 | | |
| |||
0 commit comments