refactored dockerbuild

* renamed variables
* don't package .git directory
fixed some issues with current docker API

There was an issue with responses from docker not being handled
properly. This is just a temporary solution though, as the old
mechanism was way more precise and should be resurrected taking the
changed API into account.