def build_from_dir(dir)
      image(::Docker::Image.build_from_dir(dir, &build_block))
      add_repository_tag
    rescue ::Docker::Error::DockerError => e
      DockerExceptionParser.new(e)
    end
def build_from_dir(dir)
      image(::Docker::Image.build_from_dir(dir, &build_block))
      add_repository_tag
    rescue ::Docker::Error::DockerError => e
      DockerExceptionParser.new(e)
    end
Builds the image from a directory with a Dockerfile.

 It also saves the generated image in the object internally.

 @param dir [String] The directory path.

 @return void

 @raise [Dockerspec::DockerError] For underlaying docker errors.

 @api private