Merge pull request #45508 from laurazard/c8d-dangling-image-history
c8d: image history – handle dangling images
This commit is contained in:
commit
3b443c8cfc
1 changed files with 6 additions and 3 deletions
|
@ -90,13 +90,16 @@ func (i *ImageService) ImageHistory(ctx context.Context, name string) ([]*imaget
|
|||
return nil, err
|
||||
}
|
||||
|
||||
tags := make([]string, len(tagged))
|
||||
for i, t := range tagged {
|
||||
var tags []string
|
||||
for _, t := range tagged {
|
||||
if isDanglingImage(t) {
|
||||
continue
|
||||
}
|
||||
name, err := reference.ParseNamed(t.Name)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tags[i] = reference.FamiliarString(name)
|
||||
tags = append(tags, reference.FamiliarString(name))
|
||||
}
|
||||
history[0].Tags = tags
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue