AliyunContainerService / image-syncer

Docker image synchronization tool for Docker Registry V2 based services
Apache License 2.0
861 stars 247 forks source link

[Feature] 支持使用多账户减少docker hub限速频率 #110

Closed ethan256 closed 8 months ago

ethan256 commented 1 year ago

Pull Request Description

Describe what this PR does / why we need it

docker hub对某些镜像的拉取会限速(200/6h),当达到限速时,将出现429 Too Many Requests

参考文档: https://docs.docker.com/docker-hub/download-rate-limit/ https://www.docker.com/blog/checking-your-current-docker-pull-rate-limits-and-status/

Does this pull request fix one issue?

提供多个账户和增大同步时间间隔,减小限速频率

Describe how you did it

使用多账号,在同步前检查当前账号的剩余次数,过滤剩余次数为0的用户,然后随机选择

Describe how to verify it

Special notes for reviews