docker-inspect
return low-level information on Docker objects
TLDR
SYNOPSIS
docker inspect [options] name|id [name|id...]
DESCRIPTION
docker inspect returns low-level information on Docker objects including containers, images, volumes, and networks. Output is JSON by default, an array of result objects, one per argument.The --format flag accepts a Go template for extracting specific fields, useful in shell scripts to capture values like IP addresses, mount points, or exit codes. The {{json .Field}} template emits raw JSON for a sub-object. The --type flag disambiguates when an image and container share the same name.
PARAMETERS
-f, --format string
Format output using Go template.-s, --size
Display total file sizes (containers only).--type string
Return JSON for specified type (container or image).
CAVEATS
When multiple objects share a name, --type must be used to disambiguate. For containers, --size adds SizeRw and SizeRootFs fields but is expensive on large filesystems. The output schema differs between containers, images, networks, and volumes, so format templates are not portable across object types.
SEE ALSO
docker(1), docker-ps(1), docker-images(1)
