docker-inspect

Return low-level information on Docker objects.

TLDR

Show help

$ docker inspect
copy

Display information about a container, image, or volume using a name or ID

$ docker inspect [container|image|ID]
copy

Display a container's IP address

$ docker inspect --format='[range .NetworkSettings.Networks][.IPAddress][end]' [container]
copy

Display the path to the container's log file

$ docker inspect --format='[.LogPath]' [container]
copy

Display the image name of the container

$ docker inspect --format='[.Config.Image]' [container]
copy

Display the configuration information as JSON

$ docker inspect --format='[json .Config]' [container]
copy

Display all port bindings

$ docker inspect --format='[range $p, $conf := .NetworkSettings.Ports] [$p] -> [(index $conf 0).HostPort] [end]' [container]
copy

Copied to clipboard
free 100$ digital ocean credit