Update duokai.sh
This commit is contained in:
parent
bc8ece36db
commit
1dcb855be2
@ -8,6 +8,9 @@ echo "节点社区 Telegram 频道:https://t.me/niuwuriji"
|
|||||||
# 读取加载身份码信息
|
# 读取加载身份码信息
|
||||||
read -p "输入你的身份码: " id
|
read -p "输入你的身份码: " id
|
||||||
|
|
||||||
|
# 新增:让用户输入想要创建的容器数量
|
||||||
|
read -p "请输入你想要创建的容器数量: " container_count
|
||||||
|
|
||||||
apt update
|
apt update
|
||||||
|
|
||||||
# 检查 Docker 是否已安装
|
# 检查 Docker 是否已安装
|
||||||
@ -26,8 +29,8 @@ fi
|
|||||||
# 拉取Docker镜像
|
# 拉取Docker镜像
|
||||||
docker pull nezha123/titan-edge:1.1
|
docker pull nezha123/titan-edge:1.1
|
||||||
|
|
||||||
# 创建5个容器
|
# 创建用户指定数量的容器
|
||||||
for i in {1..5}
|
for i in $(seq 1 $container_count)
|
||||||
do
|
do
|
||||||
# 为每个容器创建一个存储卷
|
# 为每个容器创建一个存储卷
|
||||||
storage="titan_storage_$i"
|
storage="titan_storage_$i"
|
||||||
@ -45,5 +48,4 @@ do
|
|||||||
titan-edge bind --hash=$id https://api-test1.container1.titannet.io/api/v2/device/binding"
|
titan-edge bind --hash=$id https://api-test1.container1.titannet.io/api/v2/device/binding"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
echo "==============================所有容器均已设置并启动===================================."
|
echo "==============================所有容器均已设置并启动===================================."
|
||||||
|
Loading…
Reference in New Issue
Block a user