def METHOD_NAME(self, build_dir: BuildDir) -> None:
    dockerfile = build_dir.dockerfile
    lines = dockerfile.lines
    if self.use_final_dockerfile:
        # when using final dockerfile, we should use DOCKERFILE_FILENAME
        add_line = f'ADD {DOCKERFILE_FILENAME} {self.df_path}\n'
        allow_path_in_dockerignore(build_dir.path, DOCKERFILE_FILENAME)
    else:
        # otherwise we should copy current snapshot and use the copied version
        shutil.copy2(build_dir.dockerfile_path, build_dir.path / self.df_name)
        add_line = f'ADD {self.df_name} {self.df_path}\n'
        allow_path_in_dockerignore(build_dir.path, self.df_name)
    # put it before last instruction
    lines.insert(-1, add_line)
    dockerfile.lines = lines
    self.log.info("added %s for the %s build", self.df_path, build_dir.platform)