provision/docker: Refactoring, avoiding queries outside repository