From 8306f1e31e58251a5ec7fe684019aed681adb434 Mon Sep 17 00:00:00 2001 From: Haichao Yang Date: Mon, 19 Aug 2019 18:28:37 +0800 Subject: [PATCH] fix docker rmi stucking Signed-off-by: Haichao Yang (cherry picked from commit d3f64846a23f447f40720e647b475e665c214a01) Signed-off-by: Sebastiaan van Stijn --- daemon/images/image_delete.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/images/image_delete.go b/daemon/images/image_delete.go index 94d6f872dd..fbd6c16b74 100644 --- a/daemon/images/image_delete.go +++ b/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{