diff --git a/builder/parser/parser.go b/builder/parser/parser.go index 24dee2abf..9c70cdce6 100644 --- a/builder/parser/parser.go +++ b/builder/parser/parser.go @@ -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