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 image builds #47

Closed
sclevine opened this issue Mar 31, 2019 · 6 comments · Fixed by #111
Closed

Reproducible image builds #47

sclevine opened this issue Mar 31, 2019 · 6 comments · Fixed by #111

Comments

@sclevine
Copy link
Member

The current lifecycle implementation enables buildpacks to perform reproducible image builds by:

  1. Clearing the FS timestamps of all the copied app files before the build starts
  2. Clearing the tar archive timestamps in each exported layer

Reproducible image builds is a key feature of CNB that other OCI image building solutions (like Dockerfiles) lack. We should add this to the spec!

Note: I suggest we set all times to one second after the epoch (like jib does) to avoid unusual behavior when timestamps are zero.

@nebhale
Copy link
Contributor

nebhale commented Apr 1, 2019

Improvement 1 seems to preclude the avoidance of a build (specifically of a compilation step) based on timestamp changes. We do make use of this kind of avoidance, although if you think that the benefits from this outweigh the performance improvements at build time, I’d be willing to give it up.

@sclevine
Copy link
Member Author

sclevine commented Apr 1, 2019

We already implement both of these behaviors in the lifecycle. Let's chat about the timestamp-based re-build avoidance. I want to understand how that works in different scenarios (e.g., re-buliding using a fresh clone from a git repo without timestamps).

@nebhale
Copy link
Contributor

nebhale commented Apr 12, 2019

Post discussion I'm fine with the changes.

@jromero
Copy link
Member

jromero commented Apr 1, 2020

Given that this issue is in spec, is there an intent to formalize this as part of the spec or is it simply an extended feature of pack and the lifecycle? FWIW, it's documented in the docs via buildpacks/docs#123

@zmackie
Copy link
Contributor

zmackie commented Apr 13, 2020

Happy to close it!

@zmackie zmackie closed this as completed Apr 13, 2020
@zmackie zmackie reopened this Apr 13, 2020
@nebhale nebhale assigned nebhale and unassigned nebhale Apr 22, 2020
@ekcasey ekcasey added this to the Platform 0.3 milestone Jun 24, 2020
@ekcasey ekcasey assigned ekcasey and unassigned ekcasey Jun 24, 2020
@ekcasey ekcasey linked a pull request Jul 14, 2020 that will close this issue
@ekcasey
Copy link
Member

ekcasey commented Jul 14, 2020

Resolved by #111

@ekcasey ekcasey closed this as completed Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants