1
0
mirror of https://github.com/containers/buildah.git synced 2025-11-28 05:04:03 +03:00
Files
buildah/commit.go
Johannes Brüderl 4bcddb7cbe cmd/commit: add flag omit-timestamp to allow for deterministic builds
By default, a field called "createdAt" is written into the image manifest.
However, even if my image build process is perfectly deterministic, the image
sha256 hash will be different every time, even if my sources are exactly the
same. In many cases it is desirable that the same input results in the exactly
same output.
This commit introduces the flag --omit-timestamp to the commit command. If set to
true, the timestamp is set to epoch 0, instead of the current timestamp (which
causes different results every time commit is invoked).

Signed-off-by: Johannes Brüderl <johannes.bruederl@gmail.com>

Closes: #1294
Approved by: nalind
2019-01-21 19:54:07 +00:00

12 KiB