Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

Commit

Permalink
resolved comments
Browse files Browse the repository at this point in the history
Signed-off-by: wangxiaoxuan273 <[email protected]>
  • Loading branch information
wangxiaoxuan273 committed Apr 20, 2023
1 parent 2a558c2 commit 4a7bf46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
}
Expand All @@ -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/"
}
Expand Down

0 comments on commit 4a7bf46

Please sign in to comment.