Skip to content

Commit fc3ecb6

Browse files
committed
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 <[email protected]>
1 parent b99e799 commit fc3ecb6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

build/opt.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,10 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt *O
117117
}
118118

119119
if v, ok := opt.BuildArgs["BUILDKIT_SYNTAX"]; ok {
120+
p := strings.SplitN(strings.TrimSpace(v), " ", 2)
120121
so.Frontend = "gateway.v0"
121-
so.FrontendAttrs["source"] = v
122+
so.FrontendAttrs["source"] = p[0]
123+
so.FrontendAttrs["cmdline"] = v
122124
}
123125

124126
if v, ok := opt.BuildArgs["BUILDKIT_MULTI_PLATFORM"]; ok {

0 commit comments

Comments
 (0)