Skip to content

Commit

Permalink
Get multi-platform buildkit frontend opt from args
Browse files Browse the repository at this point in the history
This allows builders to opt into determnistic output regardless of
multi-platform output or not.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
  • Loading branch information
cpuguy83 committed Dec 8, 2020
1 parent 35a60b8 commit 7f58ad4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,12 @@ func toSolveOpt(d driver.Driver, multiDriver bool, opt Options, dl dockerLoadCal
AllowedEntitlements: opt.Allow,
}

if v, ok := opt.BuildArgs["BUILDKIT_MULTI_PLATFORM"]; ok {
if v, _ := strconv.ParseBool(v); v {
so.FrontendAttrs["multi-platform"] = "true"
}
}

if multiDriver {
// force creation of manifest list
so.FrontendAttrs["multi-platform"] = "true"
Expand Down

0 comments on commit 7f58ad4

Please sign in to comment.