Fix build output (#2312)
* Fix build output
Multiplexing stderr to a buffer accidentally broke TTY detection in docker. This PR restores it by using a pipe instead of a wrapper.
Also fixed `--progress` not being passed to the second build step.
* fix potential stderr/stdout deadlock
* only use pty if error writer is a tty
* fix deprecation warning
* container stop prints the id, discard it
* out goes to stderr unless a writer is provided