provision,docker: refactor unit status and use correct status on build

closes #553