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

Allow overriding image creation time #137

Closed
wants to merge 2 commits into from

Conversation

imjasonh
Copy link
Member

@imjasonh imjasonh commented Feb 3, 2022

If the SOURCE_DATE_EPOCH env var is set (to a number of seconds since the Unix epoch), its value will be used as the creation time of the image produced, and of config history values for each layer.

This matches the behavior of tools like ko and is the recommendation of https://reproducible-builds.org/

See https://reproducible-builds.org/docs/source-date-epoch/


This was requested in a Slack thread, and I think unless there's a philosophical reason not to support it, the diff is small, and AFAIK will not have negative downstream effects (but isn't that always what they say?)

Anyway, let me know if there is some philosophical reason not to support it, or if you suspect there will be negative downstream effects.

@imjasonh imjasonh requested a review from a team as a code owner February 3, 2022 11:30
If the SOURCE_DATE_EPOCH env var is set (to a number of seconds since
the Unix epoch), its value will be used as the creation time of the
image produced, and of config history values for each layer.

This matches the behavior of tools like ko[0] and is the recommendation
of https://reproducible-builds.org/

0: https://github.com/google/ko#why-are-my-images-all-created-in-1970
Signed-off-by: Jason Hall <[email protected]>
@edmorley
Copy link
Contributor

I presume this can be closed, now that the alternative approach in #138 has merged?

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.

4 participants