code: public String awaitImageId(long timeout, TimeUnit timeUnit) {
          try {
              awaitCompletion(timeout, timeUnit);
          } catch (InterruptedException e) {
              throw new DockerClientException("Awaiting image id interrupted: ", e);
          }
  
          return getImageId();
      }
docs: Awaits the image id from the response stream.
  
  @throws DockerClientException
  if the build fails or the timeout occurs.