public long getTotalLayerSize() {
    long size = 0;
    for (Layer layer : image.getLayers()) {
      size += layer.getBlobDescriptor().getSize();
    }
    return size;
  }
Returns the total size of the image's layers in bytes.

@return the total size of the image's layers in bytes
jib-core/src/main/java/com/google/cloud/tools/jib/image/ImageTarball.java