ctr: use NewDockerAuthorizer instead of deprecated NewAuthorizer

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
This commit is contained in:
Akihiro Suda 2019-09-09 02:37:34 +09:00
parent ea13c9fe99
commit c1fc21e92e

View File

@ -103,7 +103,8 @@ func GetResolver(ctx gocontext.Context, clicontext *cli.Context) (remotes.Resolv
// Only one host // Only one host
return username, secret, nil return username, secret, nil
} }
options.Authorizer = docker.NewAuthorizer(options.Client, credentials) authOpts := []docker.AuthorizerOpt{docker.WithAuthClient(options.Client), docker.WithAuthCreds(credentials)}
options.Authorizer = docker.NewDockerAuthorizer(authOpts...)
return docker.NewResolver(options), nil return docker.NewResolver(options), nil
} }