-
Notifications
You must be signed in to change notification settings - Fork 509
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
Support dependencies when using bake #447
Comments
We can't locally scan the contents of the What we could do is to allow to set inputs to main target that are outputs of another target.
There are also plans to allow linking Dockerfiles together that also would solve this issue https://docs.google.com/document/d/1IafaByYR_Ao5ENw8bvIh8rbSbyh-mCAieNRrUOD3tAA/edit |
Couldn't it pull them from remote registry as well? Maybe its a bit more disconnected, but it seems like it would work from a technical standpoint. Rather than "wait for this image to appear in my local store, then use it" its "wait for this image which I know is going to be pushed to the remote store, then use it" Thanks for the link to the doc! |
Yes, if the target that is requested pushes to the registry and nothing else accesses that registry location before then your approach would work as well (except the auto-detection) and they don't replace each other. For your example of linking stages this looks like a bad solution though. More useful for a case like "only push after tests complete". |
Unless I'm missing something, I would think a simple "depends-on" field for targets would suffice:
Then the build of the "main" target would not start until all of the targets listed in "depends-on" have completed building. In this case, that would obviously just be "sleep". However it would be implemented, this would be very useful for one of the projects I am working on. |
This is related to #141. |
It would be useful to be able to define things in multiple Dockerfiles and a single docker-bake.hcl that can be done in a multi-stage build of a single Dockerfile. |
It would be useful for
bake
to automatically determine dependencies during the build phase. For example:On a fresh build, this will fail with
failed to solve: rpc error: code = Unknown desc = failed to load cache key: localhost:5000/sleep:latest: not found
On a build where
sleep
already exists, we may still want this ordering, to ensure we are getting the newly builtsleep
rather than the existing remote one.The text was updated successfully, but these errors were encountered: