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

Commit

Permalink
fix docker rmi stucking
Browse files Browse the repository at this point in the history
Signed-off-by: Haichao Yang <yang.haichao@zte.com.cn>
(cherry picked from commit d3f6484)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
yanghaichao12 authored and thaJeztah committed Sep 20, 2019
1 parent 879fba2 commit 8306f1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/images/image_delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 8306f1e

Please sign in to comment.