code: func (i *In) CheckTty(attachStdin, ttyMode bool) error {
  	// In order to attach to a container tty, input stream for the client must
  	// be a tty itself: redirecting or piping the client standard input is
  	// incompatible with `docker run -t`, `docker exec -t` or `docker attach`.
  	if ttyMode && attachStdin && !i.isTerminal {
  		eText := "the input device is not a TTY"
  		if runtime.GOOS == "windows" {
  			return errors.New(eText + ".  If you are using mintty, try prefixing the command with 'winpty'")
  		}
  		return errors.New(eText)
  	}
  	return nil
  }
docs: // CheckTty checks if we are trying to attach to a container tty
  // from a non-tty client input stream, and if so, returns an error.