Sfoglia il codice sorgente

Remove containers after stopping them

Ben Firshman 12 anni fa
parent
commit
d3bd7f3239
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      plum/service.py

+ 3 - 1
plum/service.py

@@ -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]