From 862d33b0174f7c0be24a2dfe20655d05cfb92a81 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 5 Mar 2026 15:32:11 +0100 Subject: [PATCH] feat(cloud): Kill containers before removing them for faster destruction Signed-off-by: provokateurin --- src/cloud.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/cloud.rs b/src/cloud.rs index 79d298c..d0b645c 100644 --- a/src/cloud.rs +++ b/src/cloud.rs @@ -499,6 +499,14 @@ impl Cloud { pub async fn destroy(self, docker: &Docker) -> Result<()> { for container in self.containers { + docker + .kill_container( + container.trim_start_matches('/'), + None, + ) + .await + .into_diagnostic() + .wrap_err("Failed to kill container")?; docker .remove_container( container.trim_start_matches('/'),