fix: Docker 镜像加速首选 docker.1ms.run(国内可用)
这个提交包含在:
父节点
f8d02468db
当前提交
8d400e07cc
@ -135,7 +135,7 @@ fi
|
|||||||
_DAEMON_CFG="/etc/docker/daemon.json"
|
_DAEMON_CFG="/etc/docker/daemon.json"
|
||||||
if ! curl -fsS --max-time 5 https://registry-1.docker.io/v2/ >/dev/null 2>&1; then
|
if ! curl -fsS --max-time 5 https://registry-1.docker.io/v2/ >/dev/null 2>&1; then
|
||||||
info "Docker Hub 不可达,尝试配置国内镜像加速..."
|
info "Docker Hub 不可达,尝试配置国内镜像加速..."
|
||||||
_MIRRORS='{"registry-mirrors":["https://docker.mirrors.ustc.edu.cn","https://hub-mirror.c.163.com","https://mirror.baidubce.com"]}'
|
_MIRRORS='{"registry-mirrors":["https://docker.1ms.run","https://docker.mirrors.ustc.edu.cn","https://hub-mirror.c.163.com"]}'
|
||||||
_configured=0
|
_configured=0
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
if [ "$(id -u)" -eq 0 ]; then
|
||||||
printf '%s\n' "$_MIRRORS" > "$_DAEMON_CFG" && _configured=1
|
printf '%s\n' "$_MIRRORS" > "$_DAEMON_CFG" && _configured=1
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户