Preserve raw BUILDKIT_SYNTAX as cmdline option
Set gateway `source` to the first part of `BUILDKIT_SYNTAX` and `cmdline` to the entire raw value to preserve additional options. Signed-off-by: Dan Duvall <dduvall@wikimedia.org>
This commit is contained in:
+3
-1
@@ -117,8 +117,10 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt *O
|
|||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := opt.BuildArgs["BUILDKIT_SYNTAX"]; ok {
|
if v, ok := opt.BuildArgs["BUILDKIT_SYNTAX"]; ok {
|
||||||
|
p := strings.SplitN(strings.TrimSpace(v), " ", 2)
|
||||||
so.Frontend = "gateway.v0"
|
so.Frontend = "gateway.v0"
|
||||||
so.FrontendAttrs["source"] = v
|
so.FrontendAttrs["source"] = p[0]
|
||||||
|
so.FrontendAttrs["cmdline"] = v
|
||||||
}
|
}
|
||||||
|
|
||||||
if v, ok := opt.BuildArgs["BUILDKIT_MULTI_PLATFORM"]; ok {
|
if v, ok := opt.BuildArgs["BUILDKIT_MULTI_PLATFORM"]; ok {
|
||||||
|
|||||||
Reference in New Issue
Block a user