-
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
dockerfile2llb: experimental parser directive for op metadata #242
Comments
@tonistiigi @vdemeester @dnephin Any thought? |
@AkihiroSuda I guess there is already way to pass "op metadata" in the interface between frontends and buildkit right ? I think we could experiment with that in the frontend in the form of a comment as your example. It doesn't ties us to anything for now while letting us play with workerconstraint, etc… so I'm 👍 |
Not yet (and we need that) 😅 |
As long as there is an easy way to disable them it seems fine, otherwise it could make integration more difficult. |
What's missing? Dockerfile frontend does set the op metadata to track the original command atm.
I'm not sure we should add any new Dockerfile features in this repo. It is easy to get into split head that makes replacing |
At least, we don't have CLI or something else that human users can interact with to set op metadata.
OK, and on second thought, we might be able to use CLI flags for setting stage-granularity metadata. Stage-granularity is not ideal but should cover most usecases. CLI would be like
You meant something like |
Tbh, I don't know what the best solution for this problem is. I was only commenting about if we should do it in this repo, do #163 first, or find some other repo where we can experiment with this kind of stuff. For ignore-cache I think cli flags per stage are better. Whether to do a fast build or slower build that may be more precise is a decision for the person invoking the builder(cli-flags). At the same time, dockerfile author best knows what sections should be made configurable for this. It is not ideal as all stages that user wants to reevaluate need to be set with a flag separately and dockerfile author needs to split all possible commands that user may want to reevaluate to separate stages. I think ideally dockerfile author would define a build arg (boolean) and how setting that build arg changes the cache behavior but I don't have a good syntax for that atm. For the constraints I think we should be much more careful. There is a proposal for If you are going for cli syntax for stages, I'd recommend.
|
This could be a custom frontend image # syntax = foo
FROM bar AS baz WORKERCONSTRAINT oci-runtime=nvidia-oci-runtime or
Also looks like we would have a bunch of usecases in addition to distributed mode
|
Closing as outdated |
e.g.
The text was updated successfully, but these errors were encountered: