code: def run(self):
          
          builder = self.workflow.builder
  
          allow_repo_dir_in_dockerignore(builder.df_dir)
          logs_gen = self.tasker.build_image_from_path(builder.df_dir,
                                                       builder.image)
  
          self.log.debug('build is submitted, waiting for it to finish')
          try:
              command_result = wait_for_command(logs_gen)
          except docker.errors.APIError as ex:
              return BuildResult(logs=[], fail_reason=ex.explanation)
  
          if command_result.is_failed():
              return BuildResult(logs=command_result.logs,
                                 fail_reason=command_result.error)
          else:
              image_id = builder.get_built_image_info()['Id']
              if ':' not in image_id:
                  # Older versions of the daemon do not include the prefix
                  image_id = 'sha256:{}'.format(image_id)
  
              return BuildResult(logs=command_result.logs, image_id=image_id)
docs: build image inside current environment;
          it's expected this may run within (privileged) docker container
  
  
          Input:
              df_dir
              image
  
          Output:
              BuildResult
              built_image_info
              image_id