Docker Inspect: gets the metadata for the container/mirror.
Grammar
Docker inspect [OPTIONS] name|id [name|id ...]
Options Description:
- F: Specifies the template file for the return value.
- S: Displays the total file size.
--type: returns JSON for the specified type.
Instance
Gets the meta information for the mirrored mysql:5.6:
Docker Inspect mysql:5.6output: [{"Id": "Sha256:2c0964ec182ae9a045f866bbc2553087f6e42bfc16074a74fb820af235f070ec", "Repotags": [ "mysql:5.6" ], "Repodigests": [], "Parent": "", "Comment": "", "Created": "2016-05-24t04:01:41.168371815z", "Container": "E0924bc460ff97787f34610115e9363e6363b30b8efa406e28eb495ab199ca54", "Containerconfig": { "Hostname": "b0cf605c7757", "Domainname": "", "User": "", "Attachstdin": false,"Attachstdout": false,"Attachstderr": false,"Exposedports": { "3306/tcp": {} },...
Get the IP of the container mymysql that is running:
Docker Inspect--format= ' {{range. networksettings.networks}}{{. Ipaddress}}{{end}} ' mymysql172.17.0.3
"Docker Command"-Inspect command