Skip to content

Commit

Permalink
fix: mirror warehouse image parsing error in ip:port format (#1867)
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail authored Feb 3, 2024
1 parent 4a425b1 commit 3e977e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion builder/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ func ParseImageName(s string) (i Image) {
}
i.name = name
i.Tag = sources.GetTagFromNamedRef(name)
if strings.Contains(s, ":") {
imageNameList := strings.Split(s, "/")
if strings.Contains(imageNameList[len(imageNameList)-1], ":") {
i.Name = s[:len(s)-(len(i.Tag)+1)]
} else {
i.Name = s
Expand Down

0 comments on commit 3e977e6

Please sign in to comment.