docker provider: Don't explode when removing an image if it is in use

Output from recent Docker has changed:

    Stderr: Error response from daemon: conflict: unable to delete 0ba49dd235e5 (cannot be forced) - image is being used by running container 250bbe980448

Fixes #7245
This commit is contained in:
Terry Burton 2020-01-30 20:03:45 +00:00
parent f5d57e376f
commit c9ca7b8f57
No known key found for this signature in database
GPG Key ID: 11E9CA74601C8B2A

View File

@ -166,6 +166,7 @@ module VagrantPlugins
return true
rescue => e
return false if e.to_s.include?("is using it")
return false if e.to_s.include?("is being used")
raise if !e.to_s.include?("No such image")
end