class_docstr: Container builder that uses local Docker daemon process.
class_docstr_tok: ["Container","builder","that","uses","local","Docker","daemon","process","."]
docstr: Builds Docker image.
  
  https://docker-py.readthedocs.io/en/stable/api.html#module-docker.api.build
  
  Returns:
      Image URI.
docstr_tok: ["Builds","Docker","image",".","https",":","\/\/docker-py.readthedocs.io\/en\/stable\/api.html","#","module-docker.api.build","Returns",":","Image","URI","."]
code: def _build_docker_image(self):
      """Builds Docker image.
  
      https://docker-py.readthedocs.io/en/stable/api.html#module-docker.api.build
  
      Returns:
          Image URI.
      """
      # Use the given Docker image given, if available.
      if self.docker_config:
          image_uri = self.docker_config.image
      else:
          image_uri = None
      image_uri = image_uri or generate_image_uri()
      logger.info("Building Docker image: %s", image_uri)
  
      # `fileobj` is generally set to the Dockerfile file path. If a tar file
      # is used for Docker build context (ones that includes a Dockerfile)
      # then `custom_context` should be enabled.
      with open(self.tar_file_path, "rb") as fileobj:
          bld_logs_generator = self.docker_client.build(
              path=".",
              custom_context=True,
              fileobj=fileobj,
              tag=image_uri,
              encoding="utf-8",
              decode=True,
          )
      self._get_logs(bld_logs_generator, "build", image_uri)
      return image_uri
  
imports: import logging
  import os
  import sys
  import tarfile
  import tempfile
  import time
  import uuid
  import warnings
  from .None import gcp
  from .None import machine_config
  import docker
  from google.cloud import storage
  from google.cloud.exceptions import NotFound
  from googleapiclient import discovery
  from googleapiclient import errors
  import requests
  from ..utils import google_api_client
  from ..utils import tf_utils
label_desc: Use image node_id 2 for calling the LocalContainerBuilder obj's underlying member method code with example usage: obj._build_docker_image() and returns: image_uri