@Override
  public int hashCode() {
    return Objects.hash(imageDigest, imageId);
  }
Gets a {@link BuildResult} from an {@link Image}.

@param image the image
@param targetFormat the target format of the image
@return a new {@link BuildResult} with the image's digest and id
@throws IOException if writing the digest or container configuration fails
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/BuildResult.java