Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 1b1dbac

Browse files
yanghaichao12thaJeztah
authored andcommitted
fix docker rmi stucking
Signed-off-by: Haichao Yang <yang.haichao@zte.com.cn> (cherry picked from commit d3f64846a23f447f40720e647b475e665c214a01) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 8306f1e31e58251a5ec7fe684019aed681adb434 Component: engine
1 parent c7ae679 commit 1b1dbac

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/engine/daemon/images/image_delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func (i *ImageService) checkImageDeleteConflict(imgID image.ID, mask conflictTyp
369369
if mask&conflictRunningContainer != 0 {
370370
// Check if any running container is using the image.
371371
running := func(c *container.Container) bool {
372-
return c.IsRunning() && c.ImageID == imgID
372+
return c.ImageID == imgID && c.IsRunning()
373373
}
374374
if container := i.containers.First(running); container != nil {
375375
return &imageDeleteConflict{

0 commit comments

Comments
 (0)