diff options
Diffstat (limited to 'libpod/runtime_img.go')
-rw-r--r-- | libpod/runtime_img.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime_img.go b/libpod/runtime_img.go index a95cd1d7a..2bc9feb65 100644 --- a/libpod/runtime_img.go +++ b/libpod/runtime_img.go @@ -144,6 +144,10 @@ func storageContainers(imageID string, store storage.Store) ([]string, error) { // Removes the containers passed in the array. func removeStorageContainers(ctrIDs []string, store storage.Store) error { for _, ctrID := range ctrIDs { + if _, err := store.Unmount(ctrID, true); err != nil { + return errors.Wrapf(err, "could not unmount container %q to remove it", ctrID) + } + if err := store.DeleteContainer(ctrID); err != nil { return errors.Wrapf(err, "could not remove container %q", ctrID) } |