From 7aa7f119f4bab5079c039a1f58a2a6febe4c502f Mon Sep 17 00:00:00 2001 From: lsy Date: Wed, 24 Jul 2024 14:20:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0docker=E6=8D=A2=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Menus/Docker.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Menus/Docker.sh b/Menus/Docker.sh index 3841b12..2f844fe 100644 --- a/Menus/Docker.sh +++ b/Menus/Docker.sh @@ -31,9 +31,7 @@ if [[ $pick == '1' ]];then declare -A img_dick declare -a img_number declare img_pick=0 - img_dick['中国科技技术大学(默认)']='https://docker.mirrors.ustc.edu.cn' - img_dick['阿里云']='https://registry.cn-hangzhou.aliyuncs.com' - img_dick['网易云']='http://hub-mirror.c.163.com' + img_dick['Daocloud(默认)']='https://docker.m.daocloud.io' for i in "${!img_dick[@]}"; do @@ -43,7 +41,7 @@ if [[ $pick == '1' ]];then done read -p "请输入要选择的镜像,也可直接输入镜像网站:" img_pick if [[ -z $img_pick ]];then - declare url='https://docker.mirrors.ustc.edu.cn/' + declare url='https://docker.m.daocloud.io' elif [[ $img_pick =~ ^[http] ]];then declare url=$img_pick elif [[ ${img_pick} -le 0 || ${img_pick} -ge ${!img_dick[*]} ]];then @@ -53,7 +51,7 @@ if [[ $pick == '1' ]];then echo "输入错误" exit fi - sudo echo "\"{\"registry-mirrors\": [\"${url}\"]}" > '/etc/docker/daemon.json' + sudo echo "{\"registry-mirrors\": [\"${url}\"]}" > "/etc/docker/daemon.json" sudo systemctl restart docker echo "换源成功"