Refactored dockerfile