Merge pull request #39749 from yanghaichao12/dev190815

fix docker rmi stucking
This commit is contained in:
Yong Tang 2019-08-20 10:09:01 -07:00 committed by GitHub
commit d7b484c99d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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{