Browse Source

Merge pull request #335 from thaJeztah/19.03_backport_dev190815

[19.03 backport] fix docker rmi stucking
Andrew Hsu 5 years ago
parent
commit
09b72e0be4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      daemon/images/image_delete.go

+ 1 - 1
daemon/images/image_delete.go

@@ -369,7 +369,7 @@ func (i *ImageService) checkImageDeleteConflict(imgID image.ID, mask conflictTyp
 	if mask&conflictRunningContainer != 0 {
 		// Check if any running container is using the image.
 		running := func(c *container.Container) bool {
-			return c.IsRunning() && c.ImageID == imgID
+			return c.ImageID == imgID && c.IsRunning()
 		}
 		if container := i.containers.First(running); container != nil {
 			return &imageDeleteConflict{