-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Use EPOCH timestamp as a file modification timestamp when adding libs docker layer #26735
Conversation
…f the files do not change the layer digest doesn't change either
Thanks for your pull request! The title of your pull request does not follow our editorial rules. Could you have a look?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
I don't think we want to limit to only that layer - I think the setting should be for all layers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update.
I added a comment about the documentation.
We'll also need the commits squashed
|
||
/** | ||
* Whether to set the modification time (last modified time) of the files put by Jib in the image to the actual | ||
* build time. Otherwise, the modification time will be set to the Unix epoch (00:00:00, January 1st, 1970 in UTC). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also explain what this does, basically what the effect of turning it off means for layering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Appending something like the paragraph below?
If the modification time is constant (flag is set to false so Unix epoch is used) across two consecutive builds, the docker layer sha256 digest will be different only if the actual files added by Jib to the docker layer were changed. More exactly, having 2 consecutive builds will generate different docker layers only if the actual content of the files within the docker layer was changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
Use Instant.EPOCH when adding docker layers so if the content of the files do not change the layer digest doesn't change either
Superseded by #26758 . |
Use Instant.EPOCH when adding libsMainPath layers so if the content of the files do not change the layer digest doesn't change either
Fixes: 26734