mirror of
https://github.com/clearlinux/docker.git
synced 2026-10-03 23:38:24 +00:00
Merge pull request #14578 from mountkin/fix-rmi-image-not-found
don't allow deleting the image of running containers
This commit is contained in:
@@ -151,7 +151,7 @@ func (daemon *Daemon) canDeleteImage(imgID string, force bool) error {
|
||||
parent, err := daemon.Repositories().LookupImage(container.ImageID)
|
||||
if err != nil {
|
||||
if daemon.Graph().IsNotExist(err, container.ImageID) {
|
||||
return nil
|
||||
continue
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user