Remove a Docker container. Args: container_id: Container ID to remove Returns: True if successful, False otherwise
(container_id: str)
| 421 | |
| 422 | |
| 423 | def docker_remove_container(container_id: str) -> bool: |
| 424 | """Remove a Docker container. |
| 425 | |
| 426 | Args: |
| 427 | container_id: Container ID to remove |
| 428 | |
| 429 | Returns: |
| 430 | True if successful, False otherwise |
| 431 | """ |
| 432 | try: |
| 433 | result = subprocess.run( |
| 434 | [get_docker_command(), "rm", container_id], |
| 435 | capture_output=True, |
| 436 | text=True, |
| 437 | timeout=30, |
| 438 | ) |
| 439 | return result.returncode == 0 |
| 440 | except (FileNotFoundError, subprocess.TimeoutExpired): |
| 441 | return False |
| 442 | |
| 443 | |
| 444 | def docker_force_remove_container( |
nothing calls this directly
no test coverage detected