func (s *server) GetAttach(req *runtimeapi.AttachRequest) (*runtimeapi.AttachResponse, error) { url := s.buildURL("attach", req.GetContainerId(), streamOpts{ stdin: req.GetStdin(), stdout: true, stderr: !req.GetTty(), // For TTY connections, both stderr is combined with stdout. tty: req.GetTty(), }) return &runtimeapi.AttachResponse{ Url: &url, }, nil }