Added logic to wait for docker to start before proceeding