Remove containers after stopping them

This commit is contained in:
Ben Firshman 2013-12-17 12:12:05 +00:00
parent accc1a219a
commit d3bd7f3239
1 changed files with 3 additions and 1 deletions

View File

@ -47,7 +47,9 @@ class Service(object):
return container['Id']
def stop_container(self):
self.client.kill(self.containers[0]['Id'])
container_id = self.containers[-1]['Id']
self.client.kill(container_id)
self.client.remove_container(container_id)
def next_container_number(self):
numbers = [parse_name(get_container_name(c))[1] for c in self.containers]