1.仓库镜像对应表
| 原始 | 镜像 |
| docker.io | ***.mirror.aliyuncs.com(点进去登录查看) hub-mirror.c.163.com dockerproxy.com |
| quay.io | quay.mirrors.ustc.edu.cn |
| registry.k8s.io | registry.lank8s.cn 下面的不全,适合kubeadm init时使用: registry.aliyuncs.com/google_containers/ registry.cn-hangzhou.aliyuncs.com/google_containers |
| gcr.io | gcr.lank8s.cn |
2.public-image-mirror(只支持比较流行的镜像:支持列表)
GitHub - DaoCloud/public-image-mirror: 很多镜像都在国外。比如 gcr 。国内下载很慢,需要加速。致力于提供连接全世界的稳定可靠安全的容器镜像服务。
| 源站 | 替换为 |
|---|---|
| cr.l5d.io | l5d.m.daocloud.io |
| docker.elastic.co | elastic.m.daocloud.io |
| docker.io | docker.m.daocloud.io |
| gcr.io | gcr.m.daocloud.io |
| ghcr.io | ghcr.m.daocloud.io |
| k8s.gcr.io | k8s-gcr.m.daocloud.io |
| registry.k8s.io | k8s.m.daocloud.io |
| mcr.microsoft.com | mcr.m.daocloud.io |
| nvcr.io | nvcr.m.daocloud.io |
| quay.io | quay.m.daocloud.io |
| registry.jujucharms.com | jujucharms.m.daocloud.io |
| rocks.canonical.com | rocks-canonical.m.daocloud.io |
3.Linux全局配置示例
sudo mkdir -p /etc/docker | |
sudo tee /etc/docker/daemon.json <<-'EOF' | |
{ | |
"registry-mirrors": [ | |
"https://hub-mirror.c.163.com/", | |
"https://dockerproxy.com/" | |
] | |
} | |
EOF | |
sudo systemctl daemon-reload | |
sudo systemctl restart docker |