fix: improved docker image parsing

This commit is contained in:
yusing
2025-06-04 23:00:53 +08:00
parent 3135e377a9
commit e39407886d
2 changed files with 40 additions and 0 deletions

View File

@@ -48,10 +48,13 @@ func (c containerHelper) parseImage() *ContainerImage {
im.Author = strings.Join(slashSep[:len(slashSep)-1], "/")
im.Name = slashSep[len(slashSep)-1]
} else {
im.Author = "library"
im.Name = slashSep[0]
}
if len(colonSep) > 1 {
im.Tag = colonSep[1]
} else {
im.Tag = "latest"
}
return im
}