docker images

更新时间:
2023-03-30
下载文档

docker images

查询本地镜像列表。

命令格式

docker images [imageName]:[imageTag]

参数说明

参数说明是否必填
imageName镜像名称
imageTag镜像标签

命令示例

  • 示例一:查询所有镜像列表。

    docker images
    
    REPOSITORY                         TAG               IMAGE ID       CREATED         SIZE
    127.0.0.1:5000/httpd               alpine3.17        4e7c9ee81ce6   3 months ago    56.9MB
    httpd                              alpine3.17        4e7c9ee81ce6   3 months ago    56.9MB
    nginx                              1.21              0e901e68141f   10 months ago   142MB
    127.0.0.1:5000/busybox             latest            beae173ccac6   15 months ago   1.24MB
    busybox                            latest            beae173ccac6   15 months ago   1.24MB
    127.0.0.1:5000/redis               latest            7614ae9453d1   15 months ago   113MB
    redis                              latest            7614ae9453d1   15 months ago   113MB
    127.0.0.1:5000/httpd               bullseye          dabbfbe0c57b   15 months ago   144MB
    httpd                              bullseye          dabbfbe0c57b   15 months ago   144MB
    127.0.0.1:5000/registry            v2                b8604a3fe854   16 months ago   26.2MB
    registry                           latest            b8604a3fe854   16 months ago   26.2MB
    127.0.0.1:5000/hello-world         latest            feb5d9fea6a5   18 months ago   13.3kB
    hello-world                        latest            feb5d9fea6a5   18 months ago   13.3kB
    busybox                            unstable-uclibc   9048d09ea9ad   23 months ago   1.24MB
    
  • 示例二:根据镜像名称(如 nginx)查询镜像列表。

    docker images nginx
    
    REPOSITORY   TAG       IMAGE ID       CREATED         SIZE
    nginx        1.21      0e901e68141f   10 months ago   142MB
    
  • 示例三:根据镜像名称和标签查询镜像列表。如镜像名称为 nginx、镜像标签为 1.21。

    docker images nginx:1.21
    
    REPOSITORY   TAG       IMAGE ID       CREATED         SIZE
    nginx        1.21      0e901e68141f   10 months ago   142MB
    

    查询完镜像相关信息后,可以参考如下命令进行相关操作:

文档内容是否对您有所帮助?
有帮助
没帮助