This commit is contained in:
SuperManito
2023-06-19 20:35:50 +08:00
parent 3e7f713587
commit 5433cb1af5
4 changed files with 34 additions and 5 deletions

View File

@@ -448,7 +448,7 @@ function RemoveOldVersion() {
apt-get autoremove -y >/dev/null 2>&1
;;
"${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
;;
esac
@@ -519,16 +519,16 @@ function DockerEngine() {
esac
else
Export_VersionList
echo -e "\n${GREEN} --------- 请选择你要安装的版本,如:19.03.15 ---------- ${PLAIN}\n"
echo -e "\n${GREEN} --------- 请选择你要安装的版本,如:20.10.24 ---------- ${PLAIN}\n"
cat $DockerVersionFile
echo -e '\n注以上可供选择的安装版本由官方源提供若系统过新可能无法安装较旧的版本'
echo -e '\n注以上可供选择的安装版本由官方源提供此列表以外的版本则无法安装在当前操作系统上'
while true; do
local CHOICE=$(echo -e "\n${BOLD}└─ 请根据上面的列表,选择并输入你想要安装的具体版本号:${PLAIN}\n")
read -p "${CHOICE}" DOCKER_VERSION
echo ''
cat $DockerVersionFile | grep -Eqw "${DOCKER_VERSION}"
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
rm -rf $DockerVersionFile
break

View File

@@ -50,6 +50,32 @@ bash <(curl -sSL https://linuxmirrors.cn/docker.sh)
| `--install-latested` | 控制是否安装最新版本的 Docker Engine | 地址 |
| `--ignore-backup-tips` | 忽略覆盖备份提示(即不覆盖备份) | 无 |
### 关于服务报错无法启动
!!! quote ""
非新装环境可能会在运行脚本后遇到 `Docker` 服务无法启动的情况,建议重新安装来解决,卸载不会删除镜像和容器数据
卸载命令如下:
=== "Debian 系 Linux"
``` bash
apt-get remove -y docker* containerd.io podman* runc && apt-get autoremove
```
> `Debian` &nbsp; `Ubuntu` &nbsp; `Kali`
=== "RedHat 系 Linux / OpenCloudOS / openEuler"
``` bash
yum remove -y docker* containerd.io podman* runc
```
> `Red Hat Enterprise Linux` &nbsp; `CentOS` &nbsp; `Rocky Linux` &nbsp; `AlmaLinux` &nbsp; `Fedora` &nbsp; `OpenCloudOS` &nbsp; `openEuler`
卸载完成后重新执行脚本安装即可
??? quote "原始执行脚本方法"
``` bash

View File

@@ -2,7 +2,7 @@ site_name: LinuxMirrors
repo_name: SuperManito/LinuxMirrors
repo_url: https://github.com/SuperManito/LinuxMirrors
edit_uri: edit/main/docs/
copyright: "Copyright &copy; 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 &copy; 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:
name: material
custom_dir: docs/theme

3
requirements.txt Normal file
View File

@@ -0,0 +1,3 @@
mkdocs-material==9.1.6
mkdocs-glightbox==0.3.4
mkdocs-exclude-search==0.6.5