compose_kill
Send a signal to containers in a Docker Compose project to stop or terminate them, with options to target specific services and remove orphan containers.
Instructions
Send a signal to a compose project's containers (default SIGKILL).
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)
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 |