Docker 如何从 registry mirrors 拉取镜像?


#1

根据网上找的资料,配置了 registry mirrors 在 /etc/docker/daemon.js:

{
    "registry-mirrors": [
        "https://docker.mirrors.ustc.edu.cn",
        "https://registry.docker-cn.com"
    ]
}

用 docker info 也能够看到有列出:

Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Registry Mirrors:
 https://docker.mirrors.ustc.edu.cn
 https://registry.docker-cn.com
...
Registries: docker.io (secure), registry.fedoraproject.org (secure), quay.io (secure), registry.access.redhat.com (secure), registry.centos.org (secure), docker.io (secure)

有两个问题请教大家:

  1. 做了以上配置之后, docker pull <xxx> 并没有像 dnf/pip 等直接就从 mirrors 下载了,而依然还是从 docker.io, quay.io 等下载,为何?如何才能从 mirror 拉取?
  2. quay.io 这些在哪里配置的, /etc/docker/ 下没有这些配置