Fail fast on multi platform build with load#582
Conversation
902304f to
02b8862
Compare
|
For buildx side, this check should be moved to |
|
hmm Lines 460 to 462 in 84a734d |
|
Ok so it's building before failing if the driver is |
|
@rumpl Ah, ok. That is different. Add this extra condition to https://github.com/docker/buildx/blob/master/build/build.go#L415 |
👍 I'm moving right now, will get at this next week, sorry |
| so.FrontendAttrs["platform"] = strings.Join(pp, ",") | ||
| } | ||
|
|
||
| if len(opt.Platforms) != 1 && d.Factory().Name() == "docker-container" { |
There was a problem hiding this comment.
This does not look correct. Multi-platform builds with docker-container driver are definitely supported. If I understood your description correctly then the condition you want is to check if exporting is happening to docker. Also, we should never check for driver names. There is a features list for that but don't think you need that atm., just check for the exporter.
|
I should check that the exporter is “docker” right?
Sent from mobile - please excuse tone and brevity
… On Jun 24, 2021, at 19:59, Tõnis Tiigi ***@***.***> wrote:
@tonistiigi requested changes on this pull request.
In build/build.go:
> @@ -520,6 +520,10 @@ func toSolveOpt(ctx context.Context, d driver.Driver, multiDriver bool, opt Opti
so.FrontendAttrs["platform"] = strings.Join(pp, ",")
}
+ if len(opt.Platforms) != 1 && d.Factory().Name() == "docker-container" {
This does not look correct. Multi-platform builds with docker-container driver are definitely supported. If I understood your description correctly then the condition you want is to check if exporting is happening to docker. Also, we should never check for driver names. There is a features list for that but don't think you need that atm., just check for the exporter.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Correct |
43918bf to
e78215c
Compare
| so.FrontendAttrs["platform"] = strings.Join(pp, ",") | ||
| } | ||
|
|
||
| if len(opt.Platforms) > 1 && opt.Exports[0].Type == "docker" { |
There was a problem hiding this comment.
Looks correct but move it to line 458 so all the docker exporter handling is in one place.
Signed-off-by: Djordje Lukic <[email protected]>
Avoid doing a build if we cannot load the images at the end.
This doesn't really fix anything but at least users will see the error right away and not after a potentially long build.