Docker client on OSX

This PR is based on #2923. Please address it first.

Docker client fully functional on OSX with very minor changes

Fixes #2909