This commit is contained in:
SuperManito
2023-05-12 22:00:40 +08:00
parent 2733d9e61a
commit 4c93692d38
5 changed files with 12 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
## Author: SuperManito ## Author: SuperManito
## Modified: 2023-05-10 ## Modified: 2023-05-12
## License: MIT ## License: MIT
## Github: https://github.com/SuperManito/LinuxMirrors ## Github: https://github.com/SuperManito/LinuxMirrors
## Website: https://linuxmirrors.cn ## Website: https://linuxmirrors.cn
@@ -444,11 +444,11 @@ function RemoveOldVersion() {
sleep 2s sleep 2s
case "${SYSTEM_FACTIONS}" in case "${SYSTEM_FACTIONS}" in
"${SYSTEM_DEBIAN}") "${SYSTEM_DEBIAN}")
apt-get remove -y docker-ce docker-ce-cli containerd.io runc >/dev/null 2>&1 apt-get remove -y docker-ce docker-ce-cli containerd.io runc
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 docker-ce docker-ce-cli containerd.io podman* runc >/dev/null 2>&1 yum remove -y docker-ce docker-ce-cli containerd.io podman* runc
yum autoremove -y >/dev/null 2>&1 yum autoremove -y >/dev/null 2>&1
;; ;;
esac esac
@@ -632,9 +632,9 @@ function DockerEngine() {
[[ -z "${INPUT}" ]] && INPUT=Y [[ -z "${INPUT}" ]] && INPUT=Y
case $INPUT in case $INPUT in
[Yy] | [Yy][Ee][Ss]) [Yy] | [Yy][Ee][Ss])
echo -en "\n$WORKING 正在卸载之前的版本..." echo -en "\n$WORKING 正在卸载之前的版本...\n"
RemoveOldVersion RemoveOldVersion
echo -e "\n\n$COMPLETE 卸载完毕\n" echo -e "\n$COMPLETE 卸载完毕\n"
Install Install
;; ;;
[Nn] | [Nn][Oo]) ;; [Nn] | [Nn][Oo]) ;;
@@ -655,7 +655,7 @@ function DockerEngine() {
## 查看版本并验证安装结果 ## 查看版本并验证安装结果
function CheckVersion() { function CheckVersion() {
if [ -x /usr/bin/docker ]; then if [ -x /usr/bin/docker ]; then
echo -e "\n$WORKING 验证安装版本...\n" echo -n "\n验证安装版本:"
docker -v docker -v
VERIFICATION_DOCKER=$? VERIFICATION_DOCKER=$?
if [ ${VERIFICATION_DOCKER} -eq 0 ]; then if [ ${VERIFICATION_DOCKER} -eq 0 ]; then
@@ -682,9 +682,8 @@ function CheckVersion() {
systemctl enable --now docker >/dev/null 2>&1 systemctl enable --now docker >/dev/null 2>&1
sleep 2 sleep 2
if [[ $(systemctl is-active docker) != "active" ]]; then if [[ $(systemctl is-active docker) != "active" ]]; then
echo -e "\n$ERROR 检测到 Docker 服务启动异常,可能由于重复安装相同版本导致" echo -e "\n$ERROR 检测到 Docker 服务启动异常,可能由于重复安装导致"
echo -e "\n请执行 systemctl start docker 或 service docker start 命令尝试启动" echo -e "\n${YELLOW} 请执行 "systemctl start docker""service docker start" 命令尝试启动,如若报错请尝试重新执行本脚本${PLAIN}"
echo -e "\n官方安装文档https://docs.docker.com/engine/install"
fi fi
fi fi
else else

View File

@@ -36,7 +36,7 @@
<td align="center">30 ~ 38</td> <td align="center">30 ~ 38</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="./docs/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"></a>&nbsp;CentOS</td> <td><a href="https://www.centos.org" target="_blank"><img src="./docs/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"></a>&nbsp;CentOS</td>
<td align="center">7.0 ~ 8.5 / Stream 8 ~ 9</td> <td align="center">7.0 ~ 8.5 / Stream 8 ~ 9</td>
</tr> </tr>
<tr> <tr>

View File

@@ -43,7 +43,7 @@ GNU/Linux 一键更换系统软件源脚本
<td align="center">30 ~ 38</td> <td align="center">30 ~ 38</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.25em"></a>&nbsp;CentOS</td> <td><a href="https://www.centos.org" target="_blank"><img src="/assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.25em"></a>&nbsp;CentOS</td>
<td align="center">7.0 ~ 8.5 / Stream 8 ~ 9</td> <td align="center">7.0 ~ 8.5 / Stream 8 ~ 9</td>
</tr> </tr>
<tr> <tr>

View File

@@ -10,7 +10,7 @@ hide:
<table> <table>
<tr> <tr>
<td><a href="https://www.debian.org" target="_blank"><img src="/../assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.45em"/></a>&nbsp;Debian</td> <td><a href="https://www.debian.org" target="_blank"><img src="/../assets/images/icon/debian.svg" width="16" height="16" style="vertical-align: -0.45em"/></a>&nbsp;Debian</td>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td> <td><a href="https://www.centos.org" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://cn.ubuntu.com" target="_blank"><img src="/../assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Ubuntu</td> <td><a href="https://cn.ubuntu.com" target="_blank"><img src="/../assets/images/icon/ubuntu.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;Ubuntu</td>

View File

@@ -59,7 +59,7 @@ bash <(curl -sSL https://linuxmirrors.cn/main.sh) \
<td align="center">fedora</td> <td align="center">fedora</td>
</tr> </tr>
<tr> <tr>
<td><a href="https://www.centos.org/centos-linux" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td> <td><a href="https://www.centos.org" target="_blank"><img src="/../assets/images/icon/centos.svg" width="16" height="16" style="vertical-align: -0.15em"/></a>&nbsp;CentOS</td>
<td align="center">centos/centos-stream/centos-altarch/centos-vault</td> <td align="center">centos/centos-stream/centos-altarch/centos-vault</td>
</tr> </tr>
<tr> <tr>