summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi/images.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-03-08 23:32:34 +0100
committerGitHub <noreply@github.com>2021-03-08 23:32:34 +0100
commit021ff992ffaf52d4b5400a0ccea20844ba456186 (patch)
tree26541e008e858b0a06338fbf5d7913d02f37b6b4 /pkg/domain/infra/abi/images.go
parentff46d13ea604381c3a995eae33848cf0c64b3d7a (diff)
parente9db60492261df38cbef04a03c2693547b7e107d (diff)
downloadpodman-021ff992ffaf52d4b5400a0ccea20844ba456186.tar.gz
podman-021ff992ffaf52d4b5400a0ccea20844ba456186.tar.bz2
podman-021ff992ffaf52d4b5400a0ccea20844ba456186.zip
Merge pull request #8172 from rhatdan/storage
[NO TESTS NEEDED] allow the removal of storage images
Diffstat (limited to 'pkg/domain/infra/abi/images.go')
-rw-r--r--pkg/domain/infra/abi/images.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go
index b1751b8b6..c02eb2bfc 100644
--- a/pkg/domain/infra/abi/images.go
+++ b/pkg/domain/infra/abi/images.go
@@ -640,6 +640,10 @@ func (ir *ImageEngine) Remove(ctx context.Context, images []string, opts entitie
for _, id := range images {
img, err := ir.Libpod.ImageRuntime().NewFromLocal(id)
if err != nil {
+ // attempt to remove image from storage
+ if forceErr := ir.Libpod.RemoveImageFromStorage(id); forceErr == nil {
+ continue
+ }
rmErrors = append(rmErrors, err)
continue
}