(2024年7月28日更新)想必这两天,大家已经陆续收到拉取不了docker官方镜像的反馈,通过排查发现,可能是由于一些不可描述原因导致docker hub被封禁。直接上解决方案~

目前外部可用镜像加速和操作方法如下:
crictl
以k3s为例
/etc/rancher/k3s/registries.yaml
mirrors:
registry.local.w7.cc:
endpoint:
- "http://registry.local.w7.cc"
- "http://127.0.0.1:32000"
docker.io:
endpoint:
- "https://docker.dev2.shop"
- "https://registry-1.abcio.xyz"
- "https://docker.m.daocloud.io"
- "https://docker.1panel.live"
quay.io:
endpoint:
- "https://quay.m.daocloud.io"
- "https://quay.dockerproxy.com"
gcr.io:
endpoint:
- "https://gcr.m.daocloud.io"
- "https://gcr.dockerproxy.com"
ghcr.io:
endpoint:
- "https://ghcr.m.daocloud.io"
- "https://ghcr.dockerproxy.com"
k8s.gcr.io:
endpoint:
- "https://k8s-gcr.m.daocloud.io"
- "https://k8s.dockerproxy.com"
registry.k8s.io:
endpoint:
- "https://k8s.m.daocloud.io"
- "https://k8s.dockerproxy.com"
mcr.microsoft.com:
endpoint:
- "https://mcr.m.daocloud.io"
- "https://mcr.dockerproxy.com"
nvcr.io:
endpoint:
- "https://nvcr.m.daocloud.io"
然后重启生效
systemctl restart k3s.service
docker
{
"registry-mirrors": [
"https://mirror.ccs.tencentyun.com",
"https://registry.cn-hangzhou.aliyuncs.com",
"https://docker.m.daocloud.io",
"https://docker.1panel.live"
]
}
然后重启生效
systemctl restart docker.service
欢迎关注我的公众号“辣个男人Devin”,新鲜技术文章第一时间推送。