compose_kill
Forcefully terminate containers in a Docker Compose project by sending SIGKILL immediately, with options to target specific services or use a custom signal.
Instructions
Send a signal to a compose project's containers (default SIGKILL).
Immediate, with no grace period - prefer compose_stop for a clean shutdown (stop signal,
then kill after a timeout).
Does not raise on a non-zero CLI exit (a missing compose plugin or a timeout still raises) - inspect
returncode/stderr in the result.
Args:
services: Restrict to these services (default: all)
signal: Signal to send (default "SIGKILL"; e.g. "SIGTERM", "SIGHUP")
remove_orphans: Also remove containers for services not in the compose file
project_dir: Dir with the compose file (default: server cwd; copied to the target host if no local plugin)
files: Explicit compose file paths (repeatable, -f)
project_name: Compose project name override
Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | ||
| signal | No | SIGKILL | |
| services | No | ||
| project_dir | No | ||
| project_name | No | ||
| remove_orphans | No |