Skip to content

Commit

Permalink
Merge pull request #43 from GMH233/hotfix/runtime
Browse files Browse the repository at this point in the history
fix: 删除获取容器日志的操作
  • Loading branch information
sjtuzc954 authored May 28, 2024
2 parents 441ca4a + 36f02f4 commit dcbdb9a
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions pkg/kubelet/runtime/runtime_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import (
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/go-connections/nat"

v1 "minikubernetes/pkg/api/v1"
Expand Down Expand Up @@ -438,13 +437,13 @@ func (rm *runtimeManager) createContainer(ct *v1.Container, PauseId string, PodI
// case <-statusCh:
// }

out, err := cli.ContainerLogs(ctx, resp.ID, container.LogsOptions{ShowStdout: true})
if err != nil {
//panic(err)
return "", err
}

stdcopy.StdCopy(os.Stdout, os.Stderr, out)
//out, err := cli.ContainerLogs(ctx, resp.ID, container.LogsOptions{ShowStdout: true})
//if err != nil {
// //panic(err)
// return "", err
//}
//
//stdcopy.StdCopy(os.Stdout, os.Stderr, out)
return resp.ID, nil
}

Expand Down

0 comments on commit dcbdb9a

Please sign in to comment.