1.获取下载制定版本的镜像的办法:

https://hub.docker.com/

去这个地方搜索,然后可以看到这样的内容
在这里插入图片描述

2.第二种办法,通过安装插件可以获取所有镜像列表信息
示例中以centos为例,如果查询别的,把下面的centos换成你需要的内容就是可以了

curl -s https://registry.hub.docker.com/v1/repositories/centos/tags|jq|grep name

2.1使用前需要安装一个插件(jq)

yum install jq

2.2centos镜像示例

[root@centos77 ~]# curl -s https://registry.hub.docker.com/v1/repositories/centos/tags|jq|grep name
    "name": "latest"
    "name": "5"
    "name": "5.11"
    "name": "6"
    "name": "6.10"
    "name": "6.6"
    "name": "6.7"
    "name": "6.8"
    "name": "6.9"
    "name": "7"
    "name": "7.0.1406"
    "name": "7.1.1503"
    "name": "7.2.1511"
    "name": "7.3.1611"
    "name": "7.4.1708"
    "name": "7.5.1804"
    "name": "7.6.1810"

2.3nginx镜像示例

[root@centos77 ~]# curl -s https://registry.hub.docker.com/v1/repositories/nginx/tags|jq|grep name
    "name": "latest"
    "name": "1"
    "name": "1-alpine"
    "name": "1-alpine-perl"
    "name": "1-perl"
    "name": "1.10"
    "name": "1.10-alpine"
    "name": "1.10.0"
    "name": "1.10.0-alpine"
    "name": "1.10.1"
    "name": "1.10.1-alpine"
    "name": "1.10.2"
    "name": "1.10.2-alpine"
    "name": "1.10.3"
    "name": "1.10.3-alpine"
    "name": "1.11"
    "name": "1.11-alpine"
    "name": "1.11.0"
    "name": "1.11.0-alpine"

2.4获取到镜像列表信息后就是可以下载列表中的内容了

示例:
以下载nginx的1.11为例进行下载的方式


[root@centos77 ~]# docker pull nginx:1.11

2.5查看下载镜像的方法:


[root@centos77 ~]# docker images
REPOSITORY            TAG                 IMAGE ID            CREATED             SIZE
busybox               latest              b97242f89c8a        8 days ago          1.23MB
httpd                 latest              683a7aad17d3        9 days ago          138MB
debian                latest              e7d08cddf791        10 days ago         114MB
centos                latest              300e315adb2f        6 weeks ago         209MB
mysql                 5.7                 413be204e9c3        9 months ago        456MB
portainer/portainer   latest              2869fc110bf7        10 months ago       78.6MB
tomcat                latest              a7fa4ac97be4        10 months ago       528MB
nginx                 latest              6678c7c2e56c        10 months ago       127MB
centos                6.8                 82f3b5f3c58f        22 months ago       195MB
centos                7.5.1804            cf49811e3cdb        22 months ago       200MB
nginx                 1.11                5766334bdaa0        3 years ago         183MB
[root@centos77 ~]#


更多推荐