Update duokai.sh

This commit is contained in:
smeb y 2024-03-20 10:00:46 +08:00 committed by GitHub
parent a7056dc7c6
commit 7552d52afe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,9 @@ read -p "输入你的身份码: " id
# 让用户输入想要创建的容器数量 # 让用户输入想要创建的容器数量
read -p "请输入你想要创建的节点数量单IP限制最多5个节点: " container_count read -p "请输入你想要创建的节点数量单IP限制最多5个节点: " container_count
# 让用户输入每个容器的硬盘大小限制
read -p "请输入每个节点的硬盘大小限制例如20G、30G: " disk_size
apt update apt update
# 检查 Docker 是否已安装 # 检查 Docker 是否已安装
@ -44,7 +47,7 @@ do
mkdir -p "$storage" mkdir -p "$storage"
# 运行容器并设置重启策略为always # 运行容器并设置重启策略为always
container_id=$(docker run -d --restart always -v "$PWD/$storage:/root/.titanedge/storage" --name "titan$i" nezha123/titan-edge:1.1) container_id=$(docker run -d --restart always --storage-opt size=$disk_size -v "$PWD/$storage:/root/.titanedge/storage" --name "titan$i" nezha123/titan-edge:1.1)
echo "节点 titan$i 已经启动 容器ID $container_id" echo "节点 titan$i 已经启动 容器ID $container_id"