修复(docker_start.sh): 兼容 docker compose

This commit is contained in:
feranwq 2024-03-08 09:49:25 +08:00
parent 556783581a
commit 9c19bbd97f

View File

@ -27,7 +27,7 @@ if [ $? -ne 0 ];then
echo "未安装 docker ,请先安装 docker 再运行脚本。"
else
echo "docker 环境存在,检测 docker-compose 环境是否安装..."
docker-compose --version
docker-compose --version || docker compose version && alias docker-compose="docker compose"
if [ $? -ne 0 ];then
echo "未安装 docker-compose将使用 docker 命令启动容器..."
echo "开始通过 docker 命令创建容器"
@ -46,4 +46,4 @@ else
docker-compose pull
docker-compose up -d
fi
fi
fi