【agent-go】- 修改文件打开指令

This commit is contained in:
zeaslity
2024-11-17 11:46:19 +08:00
parent 98b0e14304
commit 724ef6424c
2 changed files with 12 additions and 20 deletions

View File

@@ -4,7 +4,9 @@ import (
"fmt"
"net"
"os"
"path/filepath"
"strings"
"wdd.io/agent-go/a_agent"
"wdd.io/agent-go/a_executor/beans"
)
@@ -962,7 +964,7 @@ func (op *AgentOsOperator) InstallDockerBastion() (bool, []string) {
BasicRemoveFolderComplete("/root/wdd/docker")
dockerLocalFile := OctopusAgentInstallPrefix + dockerOfflineFileName
dockerLocalFile := filepath.Join(OctopusAgentInstallPrefix, dockerOfflineFileName)
if !BasicFileExistAndNotNull(dockerLocalFile) {
sprintf := fmt.Sprintf("docker offline file not exists ! => %s", dockerLocalFile)
log.Error(sprintf)
@@ -974,7 +976,7 @@ func (op *AgentOsOperator) InstallDockerBastion() (bool, []string) {
"-vxf",
dockerLocalFile,
"-C",
"/root/wdd",
"/root/wdd/",
})
HardCodeCommandExecutor("chmod 777 -R /root/wdd/docker/*")