docker inspect -f '{{.State.Status}}' myapp

Category: Docker

docker inspect -f '{{.State.Status}}' myapp

Show a container's status

Extracts the state field from the container's JSON metadata, printing values like running or exited. -f is shorthand for --format with a Go template. Faster to grep than full docker inspect output.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.