You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
exporter/containerimage: new option: rewrite-timestamp
rewrite-timestamp rewrites timestamps in layers for reproducible
builds.
When a layer is rewritten, an annotation "buildkit/rewritten-timestamp=<INT64>"
is set to the layer.
Example:
```
buildctl build
--frontend dockerfile.v0 \
--opt build-arg:SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH} \
--output type=oci,dest=dest.tar,rewrite-timestamp=true \
...
```
Alternative to PR 3560
Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,6 +261,8 @@ Keys supported by image output:
261
261
*`name-canonical=true`: add additional canonical name `name@<digest>`
262
262
*`compression=<uncompressed|gzip|estargz|zstd>`: choose compression type for layers newly created and cached, gzip is default value. estargz should be used with `oci-mediatypes=true`.
263
263
*`compression-level=<value>`: compression level for gzip, estargz (0-9) and zstd (0-22)
264
+
*`rewrite-timestamp=true` (Present in the `master` branch <!-- TODO: v0.13-->): rewrite the file timestamps to the `SOURCE_DATE_EPOCH` value.
265
+
See [`docs/build-repro.md`](docs/build-repro.md) for how to specify the `SOURCE_DATE_EPOCH` value.
264
266
*`force-compression=true`: forcefully apply `compression` option to all layers (including already existing layers)
265
267
*`store=true`: store the result images to the worker's (e.g. containerd) image store as well as ensures that the image has all blobs in the content store (default `true`). Ignored if the worker doesn't have image store (e.g. OCI worker).
266
268
*`annotation.<key>=<value>`: attach an annotation with the respective `key` and `value` to the built image
t.Skip("the digest is not reproducible with the \"native\" snapshotter because hardlinks are processed in a different way: https://github.com/moby/buildkit/pull/3456#discussion_r1062650263")
0 commit comments