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:
zeaslity
2025-02-28 17:45:12 +08:00
parent bffb643a56
commit 5c39bd7594
16 changed files with 586 additions and 86 deletions

View File

@@ -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() {