Evaluación y prueba de espejos de Docker

declare -a REGISTRIES=( "https://cloudsx.top" "https://docker.xuanyuan.me" "https://docker.1ms.run" "https://docker.hpcloud.cloud" "https://docker.m.daocloud.io" "https://docker.unsee.tech" "https://docker.1panel.live" "https://mirrors.ustc.edu.cn" "https://docker.chenby.cn" "https://mirror.azure.cn" "https://dockerpull.org" "https://dockerhub.icu" "https://hub.rat.dev" "https://proxy.1panel.live" "https://docker.1panel.top" "https://hub.geekery.cn" "https://docker.rainbond.cc" "https://docker.ketches.cn" "https://docker.imgdb.de" "https://docker-0.unsee.tech" "https://docker.hlmirror.com" "https://func.ink" "https://lispy.org" "https://docker.xiaogenban1993.com" )

for MIRROR_URL in "${REGISTRIES[@]}"; do [[ -z "$MIRROR_URL" ]] && continue

TIMESTAMP_START=$(date +%s)
echo "{\"registry-mirrors\": [\"${MIRROR_URL}\"]}" > /etc/docker/daemon.json

systemctl daemon-reload
systemctl reset-failed docker
systemctl restart docker

docker image prune -a -f &>/dev/null
docker pull nginx:stable &>/dev/null || continue

TIMESTAMP_END=$(date +%s)
ELAPSED_TIME=$((TIMESTAMP_END - TIMESTAMP_START))

echo -en "${ELAPSED_TIME}s\t$(docker image ls --no-trunc nginx:stable | grep nginx)\t${MIRROR_URL}\n"

done


</div><div>**Resultados de la evlauación:**</div><div>```
root@OPS:~/scripts# bash test-mirrors.sh
6s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://cloudsx.top
1s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://docker.1ms.run
1s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://docker.m.daocloud.io
37s   nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://docker.1panel.live
2s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://hub.rat.dev
2s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://docker.m.daocloud.io
7s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://docker-0.unsee.tech
6s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://docker.hlmirror.com
1s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://docker.1ms.run
6s    nginx        stable    sha256:7150b3a39203cb5bee612ff4a9d18774f8c7caf6399d6e8985e97e28eb751c18   18 hours ago   240MB    https://lispy.org

Publicado el 6-18 02:36