Merge pull request #124 from hashicorp/f-docker-cleanup-config

Add all containers when searching for images that are still in used, since the container using the image may be stopped
This commit is contained in:
Chris Bednarski 2015-09-26 21:49:26 -07:00
commit 216c605268
1 changed files with 1 additions and 0 deletions

View File

@ -344,6 +344,7 @@ func (h *dockerHandle) Kill() error {
err = h.client.RemoveImage(h.imageID)
if err != nil {
containers, err := h.client.ListContainers(docker.ListContainersOptions{
All: true,
Filters: map[string][]string{
"image": []string{h.imageID},
},