Fix logic when enabling buildkit

Signed-off-by: Tibor Vass <tibor@docker.com>
This commit is contained in:
Tibor Vass 2018-08-21 23:20:19 +00:00
parent 9972a826c8
commit c973cde760
2 changed files with 2 additions and 1 deletions

View file

@ -231,7 +231,7 @@ func (br *buildRouter) postBuild(ctx context.Context, w http.ResponseWriter, r *
}
// check if the builder feature has been enabled from daemon as well.
if buildOptions.Version == types.BuilderBuildKit && br.builderVersion != types.BuilderBuildKit {
if buildOptions.Version == types.BuilderBuildKit && br.builderVersion != "" && br.builderVersion != types.BuilderBuildKit {
return errdefs.InvalidParameter(errors.New("buildkit is not enabled on daemon"))
}

View file

@ -54,6 +54,7 @@ var flatOptions = map[string]bool{
"log-opts": true,
"runtimes": true,
"default-ulimits": true,
"features": true,
}
// skipValidateOptions contains configuration keys