refactoring docker startup