stack_ps
List tasks in a Docker stack to see where each runs and why any failed. Get a per-task view across all services to diagnose issues.
Instructions
List the tasks of a stack, parsed from --format '{{json .}}'.
Task-level view across every service in the stack (service_ps covers one service): where
each task runs and why it failed. Requires a swarm manager.
Raises RuntimeError if the CLI call fails.
args: name - The stack to list tasks for no_trunc - Do not truncate task IDs / errors in the output filters - Filter by attributes, e.g. {"desired-state": "running"}; a list value repeats the filter returns: list - One dict per task (id, name, node, image, desired/current state, error)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| filters | No | ||
| no_trunc | No |