Close stdin after execution with `docker exec -i`

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Merge pull request #8987 from erikh/exec_stdin_close

Close stdin after execution with `docker exec -i`