Docker · Arazzo Workflow
Docker Run a Command Inside a Running Container
Version 1.0.0
Confirm a container is running, create an exec instance, start it, and read back the command exit code.
Provider
Workflows
exec-command-in-container
Execute a command in a running container and capture its exit code.
Verifies the target container is running, creates an exec instance with the supplied command, starts it in attached mode, and inspects the exec instance to recover the exit code that the start call does not return.
1
confirmRunning
Confirm the container is running and not paused before creating the exec instance. Exec against a stopped or paused container is rejected with a 409.
2
createExec
Create the exec instance with the supplied command, attaching stdout and stderr so the output is streamed back on start. This call only registers the command; nothing runs yet.
3
startExec
Run the exec instance in attached (non-detached) mode. The response streams the command output but carries no exit status, which is why the flow inspects the exec instance afterwards.
4
inspectExec
Inspect the exec instance to recover the exit code and confirm the command has finished running. This is the only way to learn whether the command succeeded.
Source API Descriptions
openapi
Arazzo Workflow Specification
Work with this as data
Every workflow here is available over the APIs.io API and to AI agents over MCP.