From 7552d52afe6ed7e1d667e1cac2535b12d08ee2bb Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Wed, 20 Mar 2024 10:00:46 +0800 Subject: [PATCH] Update duokai.sh --- duokai.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/duokai.sh b/duokai.sh index ad565e9..aba88d7 100644 --- a/duokai.sh +++ b/duokai.sh @@ -18,6 +18,9 @@ read -p "输入你的身份码: " id # 让用户输入想要创建的容器数量 read -p "请输入你想要创建的节点数量,单IP限制最多5个节点: " container_count +# 让用户输入每个容器的硬盘大小限制 +read -p "请输入每个节点的硬盘大小限制(例如:20G、30G): " disk_size + apt update # 检查 Docker 是否已安装 @@ -44,7 +47,7 @@ do mkdir -p "$storage" # 运行容器,并设置重启策略为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"