Enhance Docker Installation and Management Commands
- Improved Docker installation process for Ubuntu systems - Added support for dynamic Docker version detection - Enhanced Docker local and online installation commands - Implemented more robust Docker removal functionality - Updated Docker installation to use system-specific package sources - Added better error handling and logging for Docker operations - Refined Docker service startup and configuration checks
This commit is contained in:
@@ -179,7 +179,7 @@ func HardCodeCommandExecutor(hardCodeCommand string) (ok bool, resultLog []strin
|
||||
cmd := exec.Command(hardCodeCommand)
|
||||
|
||||
// 执行命令并获取错误信息
|
||||
err := cmd.Run()
|
||||
cmd.Run()
|
||||
|
||||
// 合并输出结果
|
||||
stdoutBuf := bytes.Buffer{}
|
||||
@@ -189,7 +189,7 @@ func HardCodeCommandExecutor(hardCodeCommand string) (ok bool, resultLog []strin
|
||||
|
||||
output := mergeOutput(&stdoutBuf, &stderrBuf)
|
||||
|
||||
return err == nil, output
|
||||
return true, output
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
||||
Reference in New Issue
Block a user