Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set rewrite-timestamp=true #70

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AkihiroSuda
Copy link

Part of:

This exporter option rewrites the timestamps of the files inside image layers to use $SOURCE_DATE_EPOCH so as to increase reproducibility.

https://github.com/moby/buildkit/blob/v0.15.2/docs/build-repro.md#source_date_epoch

Part of docker-library/official-images issue 16044

This exporter option rewrites the timestamps of the files inside image layers
to use $SOURCE_DATE_EPOCH so as to increase reproducibility.

https://github.com/moby/buildkit/blob/v0.15.2/docs/build-repro.md#source_date_epoch

Signed-off-by: Akihiro Suda <[email protected]>
@tianon
Copy link
Member

tianon commented Aug 19, 2024

moby/buildkit#4576 (comment)

Regarding enabling rewrite-timestamp=true, are there any side effects? In other words, why is the behavior opt-in instead of opt-out or even just enabled by default and/or automatically enabled when an appropriate SOURCE_DATE_EPOCH is set? What are the downsides, and how do we communicate them to our users when they ask us about the metadata of the images we publish? (Which is a thing that's already surprised quite a few people in our images since we've started setting SOURCE_DATE_EPOCH and the timestamps on the metadata of layers of an image were no longer necessarily always linear, which is technically correct, but also surprising behavior, especially after ~10 years of that not being the way this works.)

You replied that it's incompatible with unpack=true - should I know what unpack is for? Having to enable this by default if it's generally sane, reasonable, and safe still feels really backwards/wrong and makes me question whether it really is generally sane, reasonable, and safe.

@AkihiroSuda
Copy link
Author

unpack=true means unpacking image blobs as containerd snapshots.
I'll try to implement the support for unpack=true, but it does not relate to docker-library/meta-scripts.

@AkihiroSuda
Copy link
Author

ping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants