Skip to content

Commit c22f261

Browse files
committed
Always consider localhost as a domain name when parsing the FQN repos name
1 parent 4dcc0f3 commit c22f261

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

registry/registry.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ func ResolveRepositoryName(reposName string) (string, string, error) {
6969
return "", "", ErrInvalidRepositoryName
7070
}
7171
nameParts := strings.SplitN(reposName, "/", 2)
72-
if !strings.Contains(nameParts[0], ".") && !strings.Contains(nameParts[0], ":") {
72+
if !strings.Contains(nameParts[0], ".") && !strings.Contains(nameParts[0], ":") &&
73+
nameParts[0] != "localhost" {
7374
// This is a Docker Index repos (ex: samalba/hipache or ubuntu)
7475
err := validateRepositoryName(reposName)
7576
return auth.IndexServerAddress(), reposName, err

0 commit comments

Comments
 (0)