add optional fields in daemon.json to enable buildkit

Signed-off-by: Anda Xu <anda.xu@docker.com>
This commit is contained in:
Anda Xu
2018-08-05 18:52:35 -07:00
parent 14d5569f19
commit 2be17666b4
10 changed files with 71 additions and 33 deletions

View File

@@ -7,7 +7,7 @@ import (
"github.com/docker/docker/api/types"
)
// Ping pings the server and returns the value of the "Docker-Experimental", "OS-Type" & "API-Version" headers
// Ping pings the server and returns the value of the "Docker-Experimental", "Builder-Version", "OS-Type" & "API-Version" headers
func (cli *Client) Ping(ctx context.Context) (types.Ping, error) {
var ping types.Ping
req, err := cli.buildRequest("GET", path.Join(cli.basePath, "/_ping"), nil, nil)
@@ -27,6 +27,9 @@ func (cli *Client) Ping(ctx context.Context) (types.Ping, error) {
ping.Experimental = true
}
ping.OSType = serverResp.header.Get("OSType")
if bv := serverResp.header.Get("Builder-Version"); bv != "" {
ping.BuilderVersion = types.BuilderVersion(bv)
}
}
return ping, cli.checkResponseErr(serverResp)
}