diff --git a/agent-go/executor/BaseFunction.go b/agent-go/executor/BaseFunction.go index 5bcb721..f6b395c 100644 --- a/agent-go/executor/BaseFunction.go +++ b/agent-go/executor/BaseFunction.go @@ -813,6 +813,45 @@ func (op *AgentOsOperator) installDockerOfflineExec(args []string) (bool, []stri if !executor { return false, append(log3, "[installDockerOfflineExec] - daemon reload error !") } + + AllCompleteExecutor([][]string{ + { + "groupadd", + "docker", + }, + { + "usermod", + "-aG", + "docker", + "root", + }, + { + "newgrp", + "docker", + }, + }) + + systemdUp, log5 := BasicSystemdUp("containerd") + if !systemdUp { + return false, append(log5, "[installDockerOfflineExec] - start containerd service error !") + } + + commandExecutor, log6 := AllCompleteExecutor([][]string{ + { + "systemctl", + "start", + "docker.socket", + }, + { + "systemctl", + "enable", + "docker.socket", + }, + }) + if !commandExecutor { + return false, append(log6, "[installDockerOfflineExec] - start docker.socket error !") + } + up, log4 := BasicSystemdUp("docker") if !up { return false, append(log4, "[installDockerOfflineExec] - start docker service error !") @@ -1883,7 +1922,6 @@ func (op *AgentOsOperator) chronyToMasterExec(args []string) (bool, []string) { ntpFile, }) - // todo restart BasicPrettyPrint(AllCompleteExecutor([][]string{ { "systemctl",