mirror of https://github.com/docker/compose.git
Remove containers after stopping them
This commit is contained in:
parent
accc1a219a
commit
d3bd7f3239
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue