LinuxCommandLibrary

docker-inspect

return low-level information on Docker objects

TLDR

Inspect a container

$ docker inspect [container]
copy
Inspect an image
$ docker inspect [image]
copy
Get specific field
$ docker inspect -f '{{.State.Status}}' [container]
copy
Get IP address
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' [container]
copy
Output as JSON
$ docker inspect --format '{{json .Config}}' [container]
copy

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. This command is essential for debugging and automation, providing complete metadata about Docker objects including configuration, state, network settings, and mounts.

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).

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community