Use Authorizer.

Signed-off-by: Lantao Liu <lantaol@google.com>
This commit is contained in:
Lantao Liu 2018-10-08 15:16:15 -07:00
parent 2f42771f77
commit 3e4cf68a3f

View File

@ -261,7 +261,7 @@ func (c *criService) getResolver(ctx context.Context, ref string, cred func(stri
return nil, imagespec.Descriptor{}, errors.Wrapf(err, "parse registry endpoint %q", e)
}
resolver := docker.NewResolver(docker.ResolverOptions{
Credentials: cred,
Authorizer: docker.NewAuthorizer(http.DefaultClient, cred),
Client: http.DefaultClient,
Host: func(string) (string, error) { return u.Host, nil },
// By default use "https".