Fixes pipe handling in container mode.
Closes #4599, #4460
- adds a way to provide options from env in both cases (tty & non tty)
- allocates TTY only if both stdin & stdout are TTYs
- enables interactive mode if stdin is not TTY
Signed-off-by: Arkadiusz Dzięgiel <[email protected]>