更新 docker-tools 至 1.2.1 版本

This commit is contained in:
huty
2025-05-13 14:44:45 +08:00
parent 1c8add2d1d
commit 8a7197243b
2 changed files with 6 additions and 3 deletions

View File

@@ -4,7 +4,7 @@
# 参数配置 # 参数配置
## 版本号 ## 版本号
VERSION=1.2.0 VERSION=1.2.1
## 当前的日期、日期时间 ## 当前的日期、日期时间
DATE=`date +%Y%m%d` DATE=`date +%Y%m%d`
DATETIME=`date +%Y%m%d`_`date +%H%M%S` DATETIME=`date +%Y%m%d`_`date +%H%M%S`
@@ -355,8 +355,8 @@ stopDocker () {
## 重启 Docker ## 重启 Docker
restartDocker () { restartDocker () {
stop stopDocker
start startDocker
} }
## 设置 Docker 自启动 ## 设置 Docker 自启动
@@ -464,6 +464,9 @@ onlyUpdateDockerCompose () {
onlyEnableDockerSwarm () { onlyEnableDockerSwarm () {
echo '------------------------------ 开始启用 Docker Swarm... ------------------------------' echo '------------------------------ 开始启用 Docker Swarm... ------------------------------'
sed -i 's#"live-restore": true#"live-restore": false#g' /etc/docker/daemon.json
restartDocker
if [ $DOCKER_SWARM_ROLE == "manager" ]; then if [ $DOCKER_SWARM_ROLE == "manager" ]; then
docker swarm init --advertise-addr $DOCKER_SWARM_MANAGER_IP docker swarm init --advertise-addr $DOCKER_SWARM_MANAGER_IP
fi fi

Binary file not shown.