• 1·搜索镜像 ```shell 格式:

    1. docker search [镜像名]

    参数使用

    1. -f #筛选

搜索收藏大于等于600

docker search mysql -f stars=600

搜索官方镜像

docker search -f is-official=ture mysql

  1. ![image.png](https://cdn.nlark.com/yuque/0/2021/png/21739648/1629288705303-9a9937f4-9861-43b2-8c49-670e8e4cee15.png#align=left&display=inline&height=320&margin=%5Bobject%20Object%5D&name=image.png&originHeight=639&originWidth=1417&size=132036&status=done&style=none&width=708.5)
  2. - **2·拉取镜像**
  3. ```shell
  4. 格式:
  5. docker pull [镜像名]
  6. #实例
  7. [root@izbp1g2kp3kgefvmrhy0moz docker]# docker pull php
  8. #状态
  9. Using default tag: latest
  10. latest: Pulling from library/php
  11. #镜像层
  12. e1acddbe380c: Pull complete
  13. c4909824c2d9: Pull complete
  14. e3d250e5f539: Pull complete
  15. bb8ea4156ce7: Pull complete
  16. 34e4e1d7f729: Pull complete
  17. 77bbbc0a3c59: Pull complete
  18. 27ee9de78aa4: Pull complete
  19. eef1f4b56a78: Pull complete
  20. 4aa663197de6: Pull complete
  21. #镜像ID号:全世界唯一
  22. Digest: sha256:72ae12b2e98dba2268d439d15aa541081b28d16b60a703f0a493d3db772e04fb
  23. #镜像下载状态
  24. Status: Downloaded newer image for php:latest
  25. #镜像的全称(镜像的tag)
  26. docker.io/library/php:latest
  • 3·查看镜像列表

    1. # 格式
    2. docker images 或者 docker image ls
    3. # 参数
    4. -q : 只显示镜像ID
    5. [root@izbp1g2kp3kgefvmrhy0moz ~]# docker images -q
    6. a8313b261903
    7. 8136c3db6bb9
    8. d1165f221234
    9. 300e315adb2f
    10. [root@izbp1g2kp3kgefvmrhy0moz ~]# docker images -q php
    11. a8313b261903
    12. [root@izbp1g2kp3kgefvmrhy0moz ~]# docker images -aq
    13. a8313b261903
    14. 8136c3db6bb9
    15. d1165f221234
    16. 300e315adb2f

    image.png

  • 4·获取镜像详细信息

    1. #格式
    2. docker inspect [镜像名]
  • 5·删除镜像 ```shell docker rmi [参数] [镜像名]

参数

-f : ```