initial working version (ported from docker-services)