This commit is contained in:
Super Manito
2025-10-22 15:09:33 +08:00
parent e26bd0d3f2
commit 06bc87f75e

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
## Author: SuperManito ## Author: SuperManito
## Modified: 2025-10-20 ## Modified: 2025-10-22
## License: MIT ## License: MIT
## GitHub: https://github.com/SuperManito/LinuxMirrors ## GitHub: https://github.com/SuperManito/LinuxMirrors
## Website: https://linuxmirrors.cn ## Website: https://linuxmirrors.cn
@@ -1563,14 +1563,14 @@ function only_change_docker_registry_mirror() {
else else
echo -e '{\n "registry-mirrors": ["https://'"${SOURCE_REGISTRY}"'"]\n}' >$File_DockerConfig echo -e '{\n "registry-mirrors": ["https://'"${SOURCE_REGISTRY}"'"]\n}' >$File_DockerConfig
fi fi
echo -e "\n${BLUE}\$${PLAIN} docker info --format '{{json .RegistryConfig.Mirrors}}'"
echo -e "\n${GREEN}${PLAIN} $(docker info --format '{{json .RegistryConfig.Mirrors}}')"
## 重启服务 ## 重启服务
systemctl daemon-reload systemctl daemon-reload
if [[ "$(systemctl is-active docker 2>/dev/null)" == "active" ]]; then if [[ "$(systemctl is-active docker 2>/dev/null)" == "active" ]]; then
systemctl restart docker systemctl restart docker
fi fi
echo -e "\n${BLUE}\$${PLAIN} docker info --format '{{json .RegistryConfig.Mirrors}}'"
echo -e "\033[2m>${PLAIN} $(docker info --format '{{json .RegistryConfig.Mirrors}}')"
if [[ "${PURE_MODE}" != "true" ]]; then if [[ "${PURE_MODE}" != "true" ]]; then
echo -e "\n$COMPLETE $(msg "result.registry.success")" echo -e "\n$COMPLETE $(msg "result.registry.success")"
fi fi