Avoid docker inspect on each usage call

Review: https://reviews.apache.org/r/26436