Docker CLI
docker inspect
Read container metadata. Use --format to select specific fields instead of sharing full metadata, which can include sensitive values. Example assumes an existing container you created in the approved disposable lab; confirm context and ownership before use. The typed docker container inspect form selects container objects explicitly.
Formal Syntax & Structure
docker syntaxdocker
docker inspect [OPTIONS] CONTAINER [CONTAINER...]Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| CONTAINER | string | Container name or ID. |
| --format | string | Go template or supported formatting selector. |
Return Value
CLI output
Metadata or selected fields.
Working Example
Example Snippetdocker
docker container inspect --format '{{.State.Status}}' bm02-job