Remove containers after stopping them
This commit is contained in:
parent
accc1a219a
commit
d3bd7f3239
1 changed files with 3 additions and 1 deletions
|
|
@ -47,7 +47,9 @@ class Service(object):
|
||||||
return container['Id']
|
return container['Id']
|
||||||
|
|
||||||
def stop_container(self):
|
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):
|
def next_container_number(self):
|
||||||
numbers = [parse_name(get_container_name(c))[1] for c in self.containers]
|
numbers = [parse_name(get_container_name(c))[1] for c in self.containers]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue