When you run docker exec or docker run with the -t flag, stdout and stderr are indistinguishable and not suitable for redirections.