use of com.google.cloud.tools.jib.image.DigestOnlyLayer in project jib by google.
the class JsonToImageTranslator method toImage.
/**
* Translates {@link V21ManifestTemplate} to {@link Image}.
*/
public static Image toImage(V21ManifestTemplate manifestTemplate) throws LayerPropertyNotFoundException {
Image image = new Image();
for (DescriptorDigest digest : manifestTemplate.getLayerDigests()) {
Layer layer = new DigestOnlyLayer(digest);
image.addLayer(layer);
}
return image;
}
Aggregations