From 4a7bf460cde1de47c5715e7899bb189e97878a5d Mon Sep 17 00:00:00 2001 From: wangxiaoxuan273 Date: Thu, 20 Apr 2023 07:08:42 +0000 Subject: [PATCH] resolved comments Signed-off-by: wangxiaoxuan273 --- registry.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/registry.go b/registry.go index 392dcfc..2ba405a 100644 --- a/registry.go +++ b/registry.go @@ -78,6 +78,7 @@ func Credential(store Store) func(context.Context, string) (auth.Credential, err func mapStoreRegistryName(registry string) string { // The Docker CLI expects that the 'docker.io' credential // will be added under the key "https://index.docker.io/v1/" + // See: https://github.com/moby/moby/blob/master/registry/config.go#L25-L48 if registry == "docker.io" { return "https://index.docker.io/v1/" } @@ -87,6 +88,7 @@ func mapStoreRegistryName(registry string) string { func mapAuthenticationRegistryName(hostname string) string { // It is expected that the traffic targetting "registry-1.docker.io" // will be redirected to "https://index.docker.io/v1/" + // See: https://github.com/moby/moby/blob/master/registry/config.go#L25-L48 if hostname == "registry-1.docker.io" { return "https://index.docker.io/v1/" }