-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Provide way to initialize SOURCE_DATE_EPOCH with git commit timestamp #3565
Comments
I'm not sure how this is implementable. The controller parses the build arg before it calls the solver to invoke the frontend, which creates LLB git state: Lines 346 to 354 in 915d245
buildkit/frontend/dockerui/context.go Lines 143 to 159 in 915d245
|
The frontend could return the epoch with the result metadata. New code is needed to actually read the timestamp with the commit. In another issue we were discussing making |
Otoh going through LLB would allow avoiding extra progress messages. |
When building from Git URL directly there shouldn't be a need to pass
--build-arg SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
manually. There should be a simple opt-in for BuildKit to do that initialization automatically, or maybe it should even be enabled by default(this does change the image creation time to commit time, but maybe that is for the better).cc @AkihiroSuda
The text was updated successfully, but these errors were encountered: