feat: remove docker container on shutdown

Add automatic cleanup of Docker containers when the application exits.
Uses a singleton runtime pattern and spawns a detached subprocess for
cleanup to ensure fast exit without blocking the UI.
This commit is contained in:
0xallam
2026-01-19 18:26:41 -08:00
committed by Ahmed Allam
parent a67fe4c45c
commit 8413987fcd
5 changed files with 45 additions and 2 deletions
+3
View File
@@ -106,7 +106,10 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
tracer.vulnerability_found_callback = display_vulnerability
def cleanup_on_exit() -> None:
from strix.runtime import cleanup_runtime
tracer.cleanup()
cleanup_runtime()
def signal_handler(_signum: int, _frame: Any) -> None:
tracer.cleanup()