Docker - Inspect

> Virtualization - (Virtual Machine|Container) > Docker

1 - About

inspect returns a JSON document containing useful configuration and status information for the specified container.

Advertising

3 - Syntax

docker inspect nostalgic_morse
[{
    "ID": "bc533791f3f500b280a9626688bc79e342e3ea0d528efe3a86a51ecb28ea20",
    "Created": "2014-05-26T05:52:40.808952951Z",
    "Path": "python",
    "Args": [
       "app.py"
    ],
    "Config": {
       "Hostname": "bc533791f3f5",
       "Domainname": "",
       "User": "",
. . .

3.1 - Filtering the output

Example: get only the IP:

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' nostalgic_morse
172.17.0.5