From dabbe4c25eae2c46f861ab4fc23b837534a94603 Mon Sep 17 00:00:00 2001 From: cheliequan <liequanche@126.com> Date: 星期三, 31 五月 2023 19:32:14 +0800 Subject: [PATCH] k8s部署时通过环境变量传递数据库连接字符串 --- src/util/util.go | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/util.go b/src/util/util.go index f29f4e2..f396fcd 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -107,10 +107,10 @@ } // 瀹夎Docker - installCommand := "sudo curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh" + installCommand := "sudo curl -fsSL https://get.docker.com -o get-docker.sh && sudo sh get-docker.sh && sudo systemctl start docker && sudo systemctl enable docker" _, err = SSHExec(nodeIP, sshUsername, sshPassword, installCommand, sshPort) if err != nil { - return fmt.Errorf("failed to install Docker on the remote server: %v", err) + return fmt.Errorf("failed to install Docker on the remote server:%v %v", nodeIP, err) } fmt.Println("Docker has been installed on the remote server.") -- Gitblit v1.8.0