Example #1
0
func (s *server) GetExec(req *runtimeapi.ExecRequest) (*runtimeapi.ExecResponse, error) {
	url := s.buildURL("exec", req.GetContainerId(), streamOpts{
		stdin:   req.GetStdin(),
		stdout:  true,
		stderr:  !req.GetTty(), // For TTY connections, both stderr is combined with stdout.
		tty:     req.GetTty(),
		command: req.GetCmd(),
	})
	return &runtimeapi.ExecResponse{
		Url: &url,
	}, nil
}