Refactoring docker_cmd
handling docker expose option
waiting for required process before spawning dependent process