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

Reproducible Builds (SOURCE_DATE_EPOCH) #585

Open
cmeyertons opened this issue Aug 2, 2024 · 5 comments
Open

Reproducible Builds (SOURCE_DATE_EPOCH) #585

cmeyertons opened this issue Aug 2, 2024 · 5 comments
Labels
Area: Incrementality Changes to the incrementality/re-build of containers Area: Library Tasks and stories around the image and layer manipulation library Area: Task

Comments

@cmeyertons
Copy link

Docker BuildKit supports reproducible builds by setting the env var SOURCE_DATE_EPOCH=0

It appears the OCI default labels does not respect this value,

This is a nice tool for teams to leverage in order to perform digest pinning, etc in their deployment pipelines (a new commit doesn't necessitate a re-deployment of infrastructure if the SHA didn't change, etc)

@rainersigwald
Copy link
Member

This may not be all that's required for #34 but it's great precedent and would probably go a long way.

@baronfel
Copy link
Member

baronfel commented Aug 2, 2024

I wonder if this flag would be interesting to the whole SDK too, independent of any integration into the containers-building portion of the tooling.

@rainersigwald
Copy link
Member

I'd say "no" other than maybe setting $(Deterministic) if it's set. The biggest thing in the containers work is the tarball timestamps IIRC; Roslyn should do a pretty good job keeping things bit-for-bit identical otherwise.

@baronfel
Copy link
Member

baronfel commented Aug 2, 2024

Details on the impacts of this value in the Docker tooling (from the linked docs) are:

The build arg value is used for:

the created timestamp in the OCI Image Config
the created timestamp in the history objects in the OCI Image Config
the org.opencontainers.image.created annotation in the OCI Image Index
the timestamp of the files exported with the local exporter
the timestamp of the files exported with the tar exporter

@cmeyertons
Copy link
Author

Also, worth noting that SOURCE_DATE_EPOCH is not Docker-specific and is standards-based.

@baronfel baronfel added Area: Task Area: Library Tasks and stories around the image and layer manipulation library Area: Incrementality Changes to the incrementality/re-build of containers labels Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Incrementality Changes to the incrementality/re-build of containers Area: Library Tasks and stories around the image and layer manipulation library Area: Task
Projects
None yet
Development

No branches or pull requests

3 participants