Browse code

Fix logic when enabling buildkit

Signed-off-by: Tibor Vass <tibor@docker.com>

Tibor Vass authored on 2018/08/22 08:20:19
Showing 2 changed files
... ...
@@ -231,7 +231,7 @@ func (br *buildRouter) postBuild(ctx context.Context, w http.ResponseWriter, r *
231 231
 	}
232 232
 
233 233
 	// check if the builder feature has been enabled from daemon as well.
234
-	if buildOptions.Version == types.BuilderBuildKit && br.builderVersion != types.BuilderBuildKit {
234
+	if buildOptions.Version == types.BuilderBuildKit && br.builderVersion != "" && br.builderVersion != types.BuilderBuildKit {
235 235
 		return errdefs.InvalidParameter(errors.New("buildkit is not enabled on daemon"))
236 236
 	}
237 237
 
... ...
@@ -54,6 +54,7 @@ var flatOptions = map[string]bool{
54 54
 	"log-opts":           true,
55 55
 	"runtimes":           true,
56 56
 	"default-ulimits":    true,
57
+	"features":           true,
57 58
 }
58 59
 
59 60
 // skipValidateOptions contains configuration keys