Cleanup regarding docker client creation

Command lilne docker client takes number of env variables as implicit
arguments. This functionality is replicated in docker_app.docker_client
function. Refactored where necessary to use this function.