From bcd33e9c4eab1d435e71b8578cf3bd64f4646143 Mon Sep 17 00:00:00 2001 From: DDSRem <1448139087@qq.com> Date: Wed, 7 Feb 2024 13:37:52 +0800 Subject: [PATCH] feat: support opensuse to install docker --- main.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.sh b/main.sh index 21659b7d49..a1d661a9a7 100644 --- a/main.sh +++ b/main.sh @@ -192,8 +192,14 @@ function packages_need() { fi fi if ! which docker; then - ERROR "docker 未安装,请手动安装!" - exit 1 + WARN "docker 未安装,脚本尝试自动安装..." + wget -qO- get.docker.com | bash + if which docker; then + INFO "docker 安装成功!" + else + ERROR "docker 安装失败,请手动安装!" + exit 1 + fi fi elif [ "$1" == "apk_alpine" ]; then if ! which curl; then