Merge pull request #5380 from laurazard/dont-normalize-registry-1-backport

[27.x backport] Revert "login: normalize `registry-1.docker.io`"
This commit is contained in:
Sebastiaan van Stijn 2024-08-29 13:33:58 +02:00 committed by GitHub
commit 40109aa45f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -111,9 +111,7 @@ func runLogin(ctx context.Context, dockerCli command.Cli, opts loginOptions) err
serverAddress string
response *registrytypes.AuthenticateOKBody
)
if opts.serverAddress != "" &&
opts.serverAddress != registry.DefaultNamespace &&
opts.serverAddress != registry.DefaultRegistryHost {
if opts.serverAddress != "" && opts.serverAddress != registry.DefaultNamespace {
serverAddress = opts.serverAddress
} else {
serverAddress = registry.IndexServer