remove specific container instead of pruning

This commit is contained in:
hugues de keyzer 2024-04-30 15:11:20 +02:00
parent f6f9c0ad80
commit af1b6efce6

View File

@ -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()