更新时间:2024-10-09 GMT+08:00
构建时拉取dockerhub镜像超时/次数限制
问题现象
执行构建任务时,拉取dockerhub镜像超时/次数限制,日志报如下异常信息:
Error response from daemon: Get https://registry.docker-cn.com/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
或
toomanyrequests: You have reached your pull rate limit. You may increase the limit by authenticating and upgrading: https://www.docker.com/increase-rate-limit
原因分析
可能是因为dockerhub镜像源的网络不稳定并且存在频率限制,容易导致拉取超时或失败。可以将dockerhub镜像源的镜像迁移到SWR上,再拉取镜像。
父主题: 镜像问题