container_stop
Gracefully stop a running container: signal the main process (SIGTERM by default), then force-kill after a timeout if needed, ensuring a clean shutdown.
Instructions
Gracefully stop a running container (its configured stop signal, then SIGKILL after a timeout).
Prefer this over container_kill for a clean shutdown: the main process receives the
container's stop signal (STOPSIGNAL, default SIGTERM) and has stop_timeout_seconds to exit
before the daemon force-kills it. Use container_restart to stop and start again in one call,
or container_pause to freeze processes without stopping. When the server runs containerized
it refuses to stop its own container.
Args: stop_timeout_seconds: Seconds between the stop signal and SIGKILL
Returns: dict: The container's full inspect payload after the stop (exit code under State.ExitCode)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id_or_name | Yes | ||
| stop_timeout_seconds | No |