Fixes a regression introduced while switching to github.com/docker/docker/client library.
github.com/docker/docker/client
Pleas read #2276 (closed) for a reference.
master
Fixes #2276 (closed)