Commit 2667fac
fix(docker): use deterministic timestamp in docker-export-metadata.json
Use getDeterministicMtime() for BuildTime in docker-export-metadata.json
instead of time.Now() to ensure deterministic metadata files.
This makes the docker-export-metadata.json file reproducible across
builds with the same source code, reducing non-determinism in exported
Docker image cache archives.
The timestamp is derived from:
- Git commit timestamp (normal case)
- SOURCE_DATE_EPOCH env var (override)
- Returns 0 in test environments
Co-authored-by: Ona <no-reply@ona.com>1 parent d153ac3 commit 2667fac
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2221 | 2221 | | |
2222 | 2222 | | |
2223 | 2223 | | |
2224 | | - | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
2225 | 2229 | | |
2226 | 2230 | | |
2227 | 2231 | | |
| |||
2367 | 2371 | | |
2368 | 2372 | | |
2369 | 2373 | | |
2370 | | - | |
| 2374 | + | |
2371 | 2375 | | |
2372 | 2376 | | |
2373 | 2377 | | |
2374 | | - | |
| 2378 | + | |
2375 | 2379 | | |
2376 | 2380 | | |
2377 | 2381 | | |
| |||
0 commit comments