public class OCIManifestTemplate extends Object implements BuildableManifestTemplate
Example manifest JSON:
{
"schemaVersion": 2,
"mediaType": "application/vnd.oci.image.manifest.v1+json",
"config": {
"mediaType": "application/vnd.oci.image.config.v1+json",
"size": 631,
"digest": "sha256:26b84ca5b9050d32e68f66ad0f3e2bbcd247198a6e6e09a7effddf126eb8d873"
},
"layers": [
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"size": 1991435,
"digest": "sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647"
},
{
"mediaType": "application/vnd.oci.image.layer.v1.tar+gzip",
"size": 32,
"digest": "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"
}
]
}
BuildableManifestTemplate.ContentDescriptorTemplate
Modifier and Type | Field and Description |
---|---|
static String |
MANIFEST_MEDIA_TYPE
The OCI manifest media type.
|
Constructor and Description |
---|
OCIManifestTemplate() |
Modifier and Type | Method and Description |
---|---|
void |
addLayer(long size,
DescriptorDigest digest)
Adds a layer to the manifest.
|
BuildableManifestTemplate.ContentDescriptorTemplate |
getContainerConfiguration() |
List<BuildableManifestTemplate.ContentDescriptorTemplate> |
getLayers() |
String |
getManifestMediaType() |
int |
getSchemaVersion() |
void |
setContainerConfiguration(long size,
DescriptorDigest digest)
Sets the content descriptor of the container configuration.
|
public static final String MANIFEST_MEDIA_TYPE
public int getSchemaVersion()
getSchemaVersion
in interface ManifestTemplate
public String getManifestMediaType()
getManifestMediaType
in interface BuildableManifestTemplate
@Nullable public BuildableManifestTemplate.ContentDescriptorTemplate getContainerConfiguration()
getContainerConfiguration
in interface BuildableManifestTemplate
public List<BuildableManifestTemplate.ContentDescriptorTemplate> getLayers()
getLayers
in interface BuildableManifestTemplate
public void setContainerConfiguration(long size, DescriptorDigest digest)
BuildableManifestTemplate
setContainerConfiguration
in interface BuildableManifestTemplate
size
- the size of the container configuration.digest
- the container configuration content descriptor digest.public void addLayer(long size, DescriptorDigest digest)
BuildableManifestTemplate
addLayer
in interface BuildableManifestTemplate
size
- the size of the layer.digest
- the layer descriptor digest.Copyright © 2019. All rights reserved.