feat: docker over tls (#178)

This commit is contained in:
Yuzerion
2025-12-23 12:01:11 +08:00
committed by GitHub
parent 09702266a9
commit 5ab0392cd3
25 changed files with 308 additions and 81 deletions

View File

@@ -34,13 +34,13 @@ func Start(c *gin.Context) {
return
}
dockerHost, ok := docker.GetDockerHostByContainerID(req.ID)
dockerCfg, ok := docker.GetDockerCfgByContainerID(req.ID)
if !ok {
c.JSON(http.StatusNotFound, apitypes.Error("container not found"))
return
}
client, err := docker.NewClient(dockerHost)
client, err := docker.NewClient(dockerCfg)
if err != nil {
c.Error(apitypes.InternalServerError(err, "failed to create docker client"))
return