Skip to content

Commit b99e799

Browse files
wnonnemakermarxarelli
authored andcommitted
Add BUILDKIT_SYNTAX option handling
This fix allows building with a remote builder where frontend.dockerfile.v0 enabled = false in the buildkitd yaml file. Note that this change only allows the usage of BUILDKIT_SYNTAX with a custom frontend image, and using the #syntax directive in this case will still fail. Resolves: #3077 Signed-off-by: Will Nonnemaker <[email protected]>
1 parent 15da604 commit b99e799

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build/opt.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ func toSolveOpt(ctx context.Context, node builder.Node, multiDriver bool, opt *O
116116
so.FrontendAttrs["cgroup-parent"] = opt.CgroupParent
117117
}
118118

119+
if v, ok := opt.BuildArgs["BUILDKIT_SYNTAX"]; ok {
120+
so.Frontend = "gateway.v0"
121+
so.FrontendAttrs["source"] = v
122+
}
123+
119124
if v, ok := opt.BuildArgs["BUILDKIT_MULTI_PLATFORM"]; ok {
120125
if v, _ := strconv.ParseBool(v); v {
121126
so.FrontendAttrs["multi-platform"] = "true"

0 commit comments

Comments
 (0)