Merge pull request #10870 from vrothberg/manifest-push-rm

manifest push --rm: use libimage for removal
This commit is contained in:
OpenShift Merge Robot 2021-07-07 11:40:10 -04:00 committed by GitHub
commit 1a9cb93f16
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -355,8 +355,8 @@ func (ir *ImageEngine) ManifestPush(ctx context.Context, name, destination strin
}
if opts.Rm {
if _, err := ir.Libpod.GetStore().DeleteImage(manifestList.ID(), true); err != nil {
return "", errors.Wrap(err, "error removing manifest after push")
if _, rmErrors := ir.Libpod.LibimageRuntime().RemoveImages(ctx, []string{manifestList.ID()}, nil); len(rmErrors) > 0 {
return "", errors.Wrap(rmErrors[0], "error removing manifest after push")
}
}