Skip to content

Commit c1fc21e

Browse files
committed
ctr: use NewDockerAuthorizer instead of deprecated NewAuthorizer
Signed-off-by: Akihiro Suda <[email protected]>
1 parent ea13c9f commit c1fc21e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/ctr/commands/resolver.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ func GetResolver(ctx gocontext.Context, clicontext *cli.Context) (remotes.Resolv
103103
// Only one host
104104
return username, secret, nil
105105
}
106-
options.Authorizer = docker.NewAuthorizer(options.Client, credentials)
106+
authOpts := []docker.AuthorizerOpt{docker.WithAuthClient(options.Client), docker.WithAuthCreds(credentials)}
107+
options.Authorizer = docker.NewDockerAuthorizer(authOpts...)
107108

108109
return docker.NewResolver(options), nil
109110
}

0 commit comments

Comments
 (0)