4-Docker命令之docker inspect

1.docker inspect介绍

docker inspect命令是用来获取docker容器或docker镜像的元数据

2.docker inspect用法

docker inspect [参数] NAME|ID [NAME|ID......]

[root@centos79 ~]# docker inspect --help

Usage:  docker inspect [OPTIONS] NAME|ID [NAME|ID...]

Return low-level information on Docker objects

Options:
  -f, --format string   Format output using a custom template:
                        'json':             Print in JSON format
                        'TEMPLATE':         Print output using the given Go template.
                        Refer to https://docs.docker.com/go/formatting/ for more information about formatting output with templates
  -s, --size            Display total file sizes if the type is container
      --type string     Return JSON for specified type
[root@centos79 ~]# 

3.实例

3.1.获取镜像信息

命令:

docker inspect tomcat-ztj:1.0
 

[root@centos79 ~]# docke

猜你喜欢

转载自blog.csdn.net/z19861216/article/details/134583499