目录
问题一:
Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit.
See 'docker run --help'.
[root@docker ~]#docker run -itd -p:81:80 --name test-01 -h test01 nginx
Unable to find image 'nginx:latest' locally
docker: Error response from daemon: toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit.
See 'docker run --help'.
原因:
DockerHub 从 2020 年 11 月 2 日,正式开始限制非付费用户的拉取频率:
匿名用户,每 6 小时只允许 pull 100 次
已登录用户,每 6 小时只允许 pull 200 次
解决方法:
更换镜像配置、绕过限制
Azure: https://dockerhub.azk8s.cn
中科大: https://ustc-edu-cn.mirror.aliyuncs.com
网易: https://hub-mirror.c.163.com
[root@docker ~]#vi /etc/docker/daemon.json
[root@docker ~]#cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://ustc-edu-cn.mirror.aliyuncs.com"]
}
#重启服务
systemctl daemon-reload
systemctl restart docker