remove specific container instead of pruning
This commit is contained in:
parent
f6f9c0ad80
commit
af1b6efce6
|
|
@ -124,10 +124,7 @@ def kill_container(container_name):
|
||||||
)
|
)
|
||||||
try:
|
try:
|
||||||
container.stop()
|
container.stop()
|
||||||
|
container.wait()
|
||||||
|
container.remove()
|
||||||
except docker.errors.NotFound as err:
|
except docker.errors.NotFound as err:
|
||||||
logger.debug(f"Cannot kill container {container.name}: {err}")
|
logger.debug(f"Cannot kill container {container.name}: {err}")
|
||||||
|
|
||||||
# TODO, we should here filter by name
|
|
||||||
# but filters={"name": container_name}
|
|
||||||
# doesn't work...
|
|
||||||
client.containers.prune()
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user