compose_stop
Stop services in a Docker Compose project without removing containers, networks, or volumes. Keeps resources intact for later restart with compose_start.
Instructions
Stop services in a compose project without removing their containers.
Unlike compose_down, containers/networks/volumes survive - use compose_start to bring them back.
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:
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
services: Specific services to stop (default: all)
stop_timeout_seconds: Grace period before SIGKILL (passed as --timeout)
timeout_seconds: Subprocess timeout (default 300s)
Returns: dict: {"returncode": int, "stdout": str, "stderr": str, "truncated": bool}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | No | ||
| services | No | ||
| project_dir | No | ||
| project_name | No | ||
| timeout_seconds | No | ||
| stop_timeout_seconds | No |