delete exited containers

This commit is contained in:
Aleksis Brezas 2014-11-18 17:07:17 +00:00 committed by Pablo Carranza Vélez
parent f5f6ee3a61
commit 86c2e1280e

View File

@ -67,7 +67,7 @@ do ->
# Cleanup containers first, so that they don't block image removal.
docker.listContainersAsync(all: true)
.filter (containerInfo) ->
!_.contains(apps, containerInfo.Image)
!_.contains(apps, containerInfo.Image) or !containerInfo.Status
.map (containerInfo) ->
docker.getContainer(containerInfo.Id).removeAsync()
.then ->