From 2b683ba9e40b5cce283389226271e95f88438a2d Mon Sep 17 00:00:00 2001 From: Super Manito <68613938+SuperManito@users.noreply.github.com> Date: Tue, 10 Jun 2025 23:39:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=85=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=8A=A0=E9=80=9F=E5=99=A8=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E4=BD=BF=E7=94=A8=E5=9C=BA=E6=99=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DockerInstallation.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DockerInstallation.sh b/DockerInstallation.sh index 99d91d1..364636a 100755 --- a/DockerInstallation.sh +++ b/DockerInstallation.sh @@ -1,6 +1,6 @@ #!/bin/bash ## Author: SuperManito -## Modified: 2025-06-04 +## Modified: 2025-06-10 ## License: MIT ## GitHub: https://github.com/SuperManito/LinuxMirrors ## Website: https://linuxmirrors.cn @@ -413,13 +413,13 @@ function collect_system_info() { elif [ -s "${File_OpenCloudOSRelease}" ]; then # 拦截 OpenCloudOS 9 及以上版本,不支持从 Docker 官方仓库安装 if [[ "${SYSTEM_VERSION_ID_MAJOR}" -ge 9 ]]; then - output_error "不支持当前操作系统,请参考如下命令自行安装:\n\ndnf install -y docker\nsystemctl enable --now docker" + [[ "${ONLY_REGISTRY}" != "true" ]] && output_error "不支持当前操作系统,请参考如下命令自行安装:\n\ndnf install -y docker\nsystemctl enable --now docker" fi SYSTEM_FACTIONS="${SYSTEM_OPENCLOUDOS}" # 自 9.0 版本起不再基于红帽 elif [ -s "${File_AnolisOSRelease}" ]; then # 拦截 Anolis OS 8.8 及以上版本,不支持从 Docker 官方仓库安装,23 版本支持 if [[ "${SYSTEM_VERSION_ID_MAJOR}" == 8 ]]; then - output_error "不支持当前操作系统,请参考如下命令自行安装:\n\ndnf install -y docker\nsystemctl enable --now docker" + [[ "${ONLY_REGISTRY}" != "true" ]] && output_error "不支持当前操作系统,请参考如下命令自行安装:\n\ndnf install -y docker\nsystemctl enable --now docker" fi SYSTEM_FACTIONS="${SYSTEM_ANOLISOS}" # 自 8.8 版本起不再基于红帽 else @@ -451,7 +451,7 @@ function collect_system_info() { SYSTEM_JUDGMENT="$(awk '{printf $1}' $File_RedHatRelease)" # 拦截 Anolis OS 8.8 以下版本,不支持从 Docker 官方仓库安装 if [[ "${SYSTEM_JUDGMENT}" == "${SYSTEM_ANOLISOS}" ]]; then - output_error "不支持当前操作系统,请参考如下命令自行安装:\n\ndnf install -y docker\nsystemctl enable --now docker" + [[ "${ONLY_REGISTRY}" != "true" ]] && output_error "不支持当前操作系统,请参考如下命令自行安装:\n\ndnf install -y docker\nsystemctl enable --now docker" fi ## 特殊系统判断 # Red Hat Enterprise Linux