docker inspect
Return low-level information on Docker objects. More information: https://docs.docker.com/reference/cli/docker/inspect/.
- Display information about a container, image, or volume using a name or ID:
docker inspect
- Display a container's IP address:
docker inspect '\{\{range.NetworkSettings.Networks\}\}\{\{.IPAddress\}\}\{\{end\}\}'
- Display the path to the container's log file:
docker inspect '\{\{.LogPath\}\}'
- Display the image name of the container:
docker inspect '\{\{.Config.Image\}\}'
- Display the configuration information as JSON:
docker inspect '\{\{json .Config\}\}'
- Display all port bindings:
docker inspect '\{\{range $p, $conf := .NetworkSettings.Ports\}\} \{\{$p\}\} -> \{\{(index $conf 0).HostPort\}\} \{\{end\}\}'
- Display help:
docker inspect
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
