Merge pull request #3630 from AkihiroSuda/ctr-newdockerauthorized

ctr: use NewDockerAuthorizer instead of deprecated NewAuthorizer
This commit is contained in:
Michael Crosby 2019-09-09 12:47:10 -04:00 committed by GitHub
commit 51671ef734
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
} }