code: public static String getImageIdFromTag(String imageTag, String host) throws IOException {
          DockerClient dockerClient = null;
          try {
              dockerClient = getDockerClient(host);
              return dockerClient.inspectImageCmd(imageTag).exec().getId();
          } finally {
              closeQuietly(dockerClient);
          }
      }
docs: Get image Id from imageTag using DockerBuildInfoHelper client.
  
  @param imageTag
  @param host
  @return