"Docker Command"-Inspect command

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.