public Builder setTargetFormat(ImageFormat targetFormat) {
      this.targetFormat =
          targetFormat == ImageFormat.Docker
              ? V22ManifestTemplate.class
              : OciManifestTemplate.class;
      return this;
    }
Sets the target format of the container image.

@param targetFormat the target format
@return this
jib-core/src/main/java/com/google/cloud/tools/jib/configuration/BuildContext.java