Skip to content

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>
  • Loading branch information
yanghaichao12 committed Aug 19, 2019
1 parent 0c46a20 commit d3f6484
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 d3f6484

Please sign in to comment.