Exited containers do not have empty status

This commit is contained in:
Aleksis Brezas 2014-12-09 20:28:30 +00:00 committed by Pablo Carranza Vélez
parent df536f672f
commit 85626a4157

View File

@ -66,7 +66,7 @@ do ->
.filter (containerInfo) ->
isUserApp = _.contains(apps, containerInfo.Image)
isSupervisor = _.contains(supervisorImages, containerInfo.Image)
isRunning = !!containerInfo.Status
isRunning = not containerInfo.Status.match(/^Exited/)
not (isUserApp or (isSupervisor and isRunning))
.map (containerInfo) ->
docker.getContainer(containerInfo.Id).removeAsync()