introduction of docker-worker, extraction of common worker methods

several changes, we need tests.