Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
login: normalize registry-1.docker.io
Browse files Browse the repository at this point in the history
Signed-off-by: Laura Brehm <laurabrehm@hey.com>
laurazard committed Aug 7, 2024
1 parent 140524a commit 8b94139
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/command/registry/login.go
Original file line number Diff line number Diff line change
@@ -89,7 +89,9 @@ func runLogin(ctx context.Context, dockerCli command.Cli, opts loginOptions) err
serverAddress string
response *registrytypes.AuthenticateOKBody
)
if opts.serverAddress != "" && opts.serverAddress != registry.DefaultNamespace {
if opts.serverAddress != "" &&
opts.serverAddress != registry.DefaultNamespace &&
opts.serverAddress != registry.DefaultRegistryHost {
serverAddress = opts.serverAddress
} else {
serverAddress = registry.IndexServer

0 comments on commit 8b94139

Please sign in to comment.