propagate TERM env with `docker run` when -t is specified

should resolve #5379 @tianon