Perform read right after subprocess for docker ps.

Perform read right after subprocess for docker ps.

Review: https://reviews.apache.org/r/26487
Change passing io output future from by reference to by value