mirror of
				https://gitee.com/SuperManito/LinuxMirrors
				synced 2025-11-04 16:30:26 +08:00 
			
		
		
		
	优化
This commit is contained in:
		@@ -448,7 +448,7 @@ function RemoveOldVersion() {
 | 
				
			|||||||
        apt-get autoremove -y >/dev/null 2>&1
 | 
					        apt-get autoremove -y >/dev/null 2>&1
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
    "${SYSTEM_REDHAT}" | "${SYSTEM_OPENCLOUDOS}" | "${SYSTEM_OPENEULER}")
 | 
					    "${SYSTEM_REDHAT}" | "${SYSTEM_OPENCLOUDOS}" | "${SYSTEM_OPENEULER}")
 | 
				
			||||||
        yum remove -y docke* containerd.io podman* runc
 | 
					        yum remove -y docker* containerd.io podman* runc
 | 
				
			||||||
        yum autoremove -y >/dev/null 2>&1
 | 
					        yum autoremove -y >/dev/null 2>&1
 | 
				
			||||||
        ;;
 | 
					        ;;
 | 
				
			||||||
    esac
 | 
					    esac
 | 
				
			||||||
@@ -519,16 +519,16 @@ function DockerEngine() {
 | 
				
			|||||||
            esac
 | 
					            esac
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
            Export_VersionList
 | 
					            Export_VersionList
 | 
				
			||||||
            echo -e "\n${GREEN} --------- 请选择你要安装的版本,如:19.03.15 ---------- ${PLAIN}\n"
 | 
					            echo -e "\n${GREEN} --------- 请选择你要安装的版本,如:20.10.24 ---------- ${PLAIN}\n"
 | 
				
			||||||
            cat $DockerVersionFile
 | 
					            cat $DockerVersionFile
 | 
				
			||||||
            echo -e '\n注:以上可供选择的安装版本由官方源提供,若系统过新可能无法安装较旧的版本'
 | 
					            echo -e '\n注:以上可供选择的安装版本由官方源提供,此列表以外的版本则无法安装在当前操作系统上'
 | 
				
			||||||
            while true; do
 | 
					            while true; do
 | 
				
			||||||
                local CHOICE=$(echo -e "\n${BOLD}└─ 请根据上面的列表,选择并输入你想要安装的具体版本号:${PLAIN}\n")
 | 
					                local CHOICE=$(echo -e "\n${BOLD}└─ 请根据上面的列表,选择并输入你想要安装的具体版本号:${PLAIN}\n")
 | 
				
			||||||
                read -p "${CHOICE}" DOCKER_VERSION
 | 
					                read -p "${CHOICE}" DOCKER_VERSION
 | 
				
			||||||
                echo ''
 | 
					                echo ''
 | 
				
			||||||
                cat $DockerVersionFile | grep -Eqw "${DOCKER_VERSION}"
 | 
					                cat $DockerVersionFile | grep -Eqw "${DOCKER_VERSION}"
 | 
				
			||||||
                if [ $? -eq 0 ]; then
 | 
					                if [ $? -eq 0 ]; then
 | 
				
			||||||
                    echo "${DOCKER_VERSION}" | grep -Eqw '[1,2][0-9].[0,1]{1,2}.[0-9]{1,2}'
 | 
					                    echo "${DOCKER_VERSION}" | grep -Eqw '[0-9][0-9].[0-9]{1,2}.[0-9]{1,2}'
 | 
				
			||||||
                    if [ $? -eq 0 ]; then
 | 
					                    if [ $? -eq 0 ]; then
 | 
				
			||||||
                        rm -rf $DockerVersionFile
 | 
					                        rm -rf $DockerVersionFile
 | 
				
			||||||
                        break
 | 
					                        break
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -50,6 +50,32 @@ bash <(curl -sSL https://linuxmirrors.cn/docker.sh)
 | 
				
			|||||||
| `--install-latested` | 控制是否安装最新版本的 Docker Engine | 地址 |
 | 
					| `--install-latested` | 控制是否安装最新版本的 Docker Engine | 地址 |
 | 
				
			||||||
| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
 | 
					| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### 关于服务报错无法启动
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!!! quote ""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    非新装环境可能会在运行脚本后遇到 `Docker` 服务无法启动的情况,建议重新安装来解决,卸载不会删除镜像和容器数据
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    卸载命令如下:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    === "Debian 系 Linux"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ``` bash
 | 
				
			||||||
 | 
					        apt-get remove -y docker* containerd.io podman* runc && apt-get autoremove
 | 
				
			||||||
 | 
					        ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        > `Debian`   `Ubuntu`   `Kali`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    === "RedHat 系 Linux / OpenCloudOS / openEuler"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        ``` bash
 | 
				
			||||||
 | 
					        yum remove -y docker* containerd.io podman* runc
 | 
				
			||||||
 | 
					        ```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        > `Red Hat Enterprise Linux`   `CentOS`   `Rocky Linux`   `AlmaLinux`   `Fedora`   `OpenCloudOS`   `openEuler`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    卸载完成后重新执行脚本安装即可
 | 
				
			||||||
 | 
					
 | 
				
			||||||
??? quote "原始执行脚本方法"
 | 
					??? quote "原始执行脚本方法"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ``` bash
 | 
					    ``` bash
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@ site_name: LinuxMirrors
 | 
				
			|||||||
repo_name: SuperManito/LinuxMirrors
 | 
					repo_name: SuperManito/LinuxMirrors
 | 
				
			||||||
repo_url: https://github.com/SuperManito/LinuxMirrors
 | 
					repo_url: https://github.com/SuperManito/LinuxMirrors
 | 
				
			||||||
edit_uri: edit/main/docs/
 | 
					edit_uri: edit/main/docs/
 | 
				
			||||||
copyright: "Copyright © 2023 <a href=\"https://github.com/SuperManito\" target=\"_blank\"> SuperManito</a>. Website built with <a href=\"https://www.netlify.com\" target=\"_blank\"><img height=\"64\" width=\"64\" src=\"/assets/images/icon/netlify.svg\" style=\"vertical-align: -0.6em\"></a>"
 | 
					copyright: "Copyright © 2023 <a href=\"https://github.com/SuperManito\" target=\"_blank\"> SuperManito</a> <a href=\"https://www.netlify.com\" target=\"_blank\"><img height=\"64\" width=\"64\" src=\"/assets/images/icon/netlify.svg\" style=\"vertical-align: -0.6em\"></a>"
 | 
				
			||||||
theme:
 | 
					theme:
 | 
				
			||||||
  name: material
 | 
					  name: material
 | 
				
			||||||
  custom_dir: docs/theme
 | 
					  custom_dir: docs/theme
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								requirements.txt
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,3 @@
 | 
				
			|||||||
 | 
					mkdocs-material==9.1.6
 | 
				
			||||||
 | 
					mkdocs-glightbox==0.3.4
 | 
				
			||||||
 | 
					mkdocs-exclude-search==0.6.5
 | 
				
			||||||
		Reference in New Issue
	
	Block a user