Class V22ManifestTemplate
- java.lang.Object
-
- com.google.cloud.tools.jib.image.json.V22ManifestTemplate
-
- All Implemented Interfaces:
BuildableManifestTemplate
,ManifestTemplate
,JsonTemplate
public class V22ManifestTemplate extends java.lang.Object implements BuildableManifestTemplate
JSON Template for Docker Manifest Schema V2.2Example manifest JSON:
{ "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.v2+json", "config": { "mediaType": "application/vnd.docker.container.image.v1+json", "size": 631, "digest": "sha256:26b84ca5b9050d32e68f66ad0f3e2bbcd247198a6e6e09a7effddf126eb8d873" }, "layers": [ { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 1991435, "digest": "sha256:b56ae66c29370df48e7377c8f9baa744a3958058a766793f821dadcb144a4647" }, { "mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip", "size": 32, "digest": "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" } ] }
- See Also:
- Image Manifest Version 2, Schema 2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.cloud.tools.jib.image.json.BuildableManifestTemplate
BuildableManifestTemplate.ContentDescriptorTemplate
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MANIFEST_MEDIA_TYPE
The Docker V2.2 manifest media type.
-
Constructor Summary
Constructors Constructor Description V22ManifestTemplate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLayer(long size, DescriptorDigest digest)
Adds a layer to the manifest.BuildableManifestTemplate.ContentDescriptorTemplate
getContainerConfiguration()
Returns the content descriptor of the container configuration.java.util.List<BuildableManifestTemplate.ContentDescriptorTemplate>
getLayers()
Returns an unmodifiable view of the layers.java.lang.String
getManifestMediaType()
Returns the media type for this manifest, specific to the image format.int
getSchemaVersion()
void
setContainerConfiguration(long size, DescriptorDigest digest)
Sets the content descriptor of the container configuration.
-
-
-
Field Detail
-
MANIFEST_MEDIA_TYPE
public static final java.lang.String MANIFEST_MEDIA_TYPE
The Docker V2.2 manifest media type.- See Also:
- Constant Field Values
-
-
Method Detail
-
getSchemaVersion
public int getSchemaVersion()
- Specified by:
getSchemaVersion
in interfaceManifestTemplate
-
getManifestMediaType
public java.lang.String getManifestMediaType()
Description copied from interface:BuildableManifestTemplate
Returns the media type for this manifest, specific to the image format.- Specified by:
getManifestMediaType
in interfaceBuildableManifestTemplate
- Specified by:
getManifestMediaType
in interfaceManifestTemplate
- Returns:
- the media type for this manifest, specific to the image format
-
getContainerConfiguration
@Nullable public BuildableManifestTemplate.ContentDescriptorTemplate getContainerConfiguration()
Description copied from interface:BuildableManifestTemplate
Returns the content descriptor of the container configuration.- Specified by:
getContainerConfiguration
in interfaceBuildableManifestTemplate
- Returns:
- the content descriptor of the container configuration
-
getLayers
public java.util.List<BuildableManifestTemplate.ContentDescriptorTemplate> getLayers()
Description copied from interface:BuildableManifestTemplate
Returns an unmodifiable view of the layers.- Specified by:
getLayers
in interfaceBuildableManifestTemplate
- Returns:
- an unmodifiable view of the layers
-
setContainerConfiguration
public void setContainerConfiguration(long size, DescriptorDigest digest)
Description copied from interface:BuildableManifestTemplate
Sets the content descriptor of the container configuration.- Specified by:
setContainerConfiguration
in interfaceBuildableManifestTemplate
- Parameters:
size
- the size of the container configuration.digest
- the container configuration content descriptor digest.
-
addLayer
public void addLayer(long size, DescriptorDigest digest)
Description copied from interface:BuildableManifestTemplate
Adds a layer to the manifest.- Specified by:
addLayer
in interfaceBuildableManifestTemplate
- Parameters:
size
- the size of the layer.digest
- the layer descriptor digest.
-
-