Commit ce46982
authored
Update ffmpeg and change static build provider (#64)
Please merge PR #60 prior to merging this PR. The basis of this PR is PR
#60 and once merged this diff should clear up.
This PR changes the provider for static ffmpeg builds to a Github
repository source linked from
[https://ffmpeg.org/download.html](https://ffmpeg.org/download.html).
The associated checksum work is updated as necessitated by the change
from MD5 to SHA256.
The build for ffmpeg is set to the latest version and will continually
update as new versions are released. Updating without some form of
pinning may or may not be an acceptable approach here.
The old provider could be added as a backup. Issues could arise in cases
where the fallback is used as builds between providers may not be
versioned 1:1 (not in a strict reproducibility sense).
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Replaces FFmpeg static builds with BtbN GitHub releases using SHA256
verification and adds platform-scoped BuildKit caches across Dockerfiles
for faster, reproducible builds.
>
> - **FFmpeg**:
> - Add dedicated `ffmpeg-downloader` stage (Ubuntu 22.04) that fetches
from `BtbN/FFmpeg-Builds` with SHA256 verification and arch selection;
copy `ffmpeg`/`ffprobe` into final images.
> - Remove old inline downloads and MD5 checks in
`images/chromium-headful/Dockerfile` and
`images/chromium-headless/image/Dockerfile`.
> - **Build performance (BuildKit caching)**:
> - Introduce platform-aware cache prefix `CACHEIDPREFIX` using
`TARGETOS`/`TARGETARCH`.
> - Add cache mounts for `apt`, `npm`, and `go` in `chromium-headful`,
`chromium-headless`, `client`, `xorg-deps`, and `xf86-input-neko`
Dockerfiles.
> - **Misc Dockerfile tweaks**:
> - Standardize `ARG TARGETOS/TARGETARCH` across stages; keep downloaded
APT packages and use locked cache sharing; minor cleanup (e.g., switch
global npm installs to cached).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
2f19ef4. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---
<!-- mesa-description-start -->
## TL;DR
Switched the static `ffmpeg` build provider to a more reliable, official
source and significantly optimized Docker image builds across the
project by leveraging BuildKit caching.
## Why we made these changes
The previous `ffmpeg` provider was unreliable, causing potential build
failures. The new provider is linked directly from the official
`ffmpeg.org` website, ensuring a trusted and up-to-date source.
Additionally, our Docker builds were inefficient; implementing
widespread BuildKit caching dramatically speeds up build times and
reduces final image sizes by avoiding redundant package downloads.
## What changed?
- **FFmpeg Provider:**
- Changed the download source for static `ffmpeg` builds to the
`BtbN/FFmpeg-Builds` GitHub repository.
- Updated the checksum verification from MD5 to SHA256 to match the new
provider.
- Pinned the build to the `latest` release for continuous updates.
- **Build Performance & Image Size:**
- Optimized all major Dockerfiles (`chromium-headful`,
`chromium-headless`, `xorg-deps`, etc.) to use BuildKit cache mounts for
`apt`, `npm`, and `go` package management.
- Consistently used `--no-install-recommends` during `apt-get install`
across all relevant Dockerfiles to create leaner final images.
- **Configuration:**
- Added `.mise.toml` to the project's `.gitignore` to ignore local
`mise` tool version configurations.
## Validation
- [ ] Verify that all Docker images build successfully.
- [ ] Confirm that `ffmpeg` is correctly installed and functional inside
the final images.
- [ ] Check that subsequent builds are noticeably faster due to the new
caching mechanisms.
<sup>_Description generated by Mesa. [Update
settings](https://app.mesa.dev/onkernel/settings/pull-requests)_</sup>
<!-- mesa-description-end -->
---------
Co-authored-by: Matt Marangoni <[email protected]>1 parent b51da91 commit ce46982
File tree
5 files changed
+239
-111
lines changed- images
- chromium-headful
- client
- xorg-deps
- xf86-input-neko
- chromium-headless/image
5 files changed
+239
-111
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
10 | | - | |
11 | | - | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
18 | | - | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
29 | 39 | | |
30 | | - | |
| 40 | + | |
31 | 41 | | |
32 | | - | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | 45 | | |
36 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
37 | 53 | | |
38 | | - | |
39 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
40 | 57 | | |
41 | 58 | | |
42 | | - | |
43 | 59 | | |
44 | 60 | | |
45 | 61 | | |
46 | 62 | | |
47 | 63 | | |
48 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
49 | 67 | | |
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
53 | 71 | | |
54 | 72 | | |
55 | 73 | | |
56 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
57 | 77 | | |
58 | 78 | | |
59 | 79 | | |
60 | 80 | | |
61 | 81 | | |
62 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
63 | 149 | | |
64 | 150 | | |
65 | 151 | | |
66 | 152 | | |
67 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
68 | 159 | | |
69 | 160 | | |
70 | 161 | | |
71 | | - | |
72 | | - | |
| 162 | + | |
| 163 | + | |
73 | 164 | | |
74 | 165 | | |
75 | 166 | | |
| |||
119 | 210 | | |
120 | 211 | | |
121 | 212 | | |
122 | | - | |
| 213 | + | |
123 | 214 | | |
124 | 215 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
| 216 | + | |
| 217 | + | |
156 | 218 | | |
157 | 219 | | |
158 | 220 | | |
159 | | - | |
160 | | - | |
| 221 | + | |
| 222 | + | |
161 | 223 | | |
162 | 224 | | |
163 | 225 | | |
| |||
190 | 252 | | |
191 | 253 | | |
192 | 254 | | |
193 | | - | |
194 | | - | |
| 255 | + | |
| 256 | + | |
195 | 257 | | |
196 | | - | |
197 | | - | |
| 258 | + | |
| 259 | + | |
198 | 260 | | |
199 | 261 | | |
200 | 262 | | |
| |||
215 | 277 | | |
216 | 278 | | |
217 | 279 | | |
218 | | - | |
| 280 | + | |
219 | 281 | | |
220 | 282 | | |
221 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | | - | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
12 | 17 | | |
13 | 18 | | |
14 | | - | |
| 19 | + | |
15 | 20 | | |
16 | 21 | | |
17 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | | - | |
8 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
10 | 15 | | |
11 | | - | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
29 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
30 | 38 | | |
31 | 39 | | |
32 | 40 | | |
| |||
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | | - | |
6 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
7 | 12 | | |
8 | 13 | | |
9 | | - | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
18 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
19 | 25 | | |
20 | 26 | | |
21 | 27 | | |
| |||
0 commit comments