Class V22ManifestListTemplate
- java.lang.Object
-
- com.google.cloud.tools.jib.image.json.V22ManifestListTemplate
-
- All Implemented Interfaces:
ManifestListTemplate
,ManifestTemplate
,JsonTemplate
public class V22ManifestListTemplate extends java.lang.Object implements ManifestListTemplate
JSON Template for Docker Manifest List Schema V2.2Example manifest list JSON:
{ "schemaVersion": 2, "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json", "manifests": [ { "mediaType": "application/vnd.docker.image.manifest.v2+json", "size": 7143, "digest": "sha256:e692418e4cbaf90ca69d05a66403747baa33ee08806650b51fab815ad7fc331f", "platform": { "architecture": "ppc64le", "os": "linux", } }, { "mediaType": "application/vnd.docker.image.manifest.v2+json", "size": 7682, "digest": "sha256:5b0bcabd1ed22e9fb1310cf6c2dec7cdef19f0ad69efa1f392e94a4333501270", "platform": { "architecture": "amd64", "os": "linux", "features": [ "sse4" ] } } ] }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
V22ManifestListTemplate.ManifestDescriptorTemplate
Template for inner JSON object representing a single platform specific manifest.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
MANIFEST_MEDIA_TYPE
-
Constructor Summary
Constructors Constructor Description V22ManifestListTemplate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addManifest(V22ManifestListTemplate.ManifestDescriptorTemplate manifest)
Adds a manifest.java.util.List<java.lang.String>
getDigestsForPlatform(java.lang.String architecture, java.lang.String os)
Returns a list of digests for a specific platform found in the manifest list.java.lang.String
getManifestMediaType()
java.util.List<V22ManifestListTemplate.ManifestDescriptorTemplate>
getManifests()
int
getSchemaVersion()
-
-
-
Field Detail
-
MANIFEST_MEDIA_TYPE
public static final java.lang.String 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()
- Specified by:
getManifestMediaType
in interfaceManifestTemplate
-
addManifest
public void addManifest(V22ManifestListTemplate.ManifestDescriptorTemplate manifest)
Adds a manifest.- Parameters:
manifest
- a manifest descriptor
-
getManifests
public java.util.List<V22ManifestListTemplate.ManifestDescriptorTemplate> getManifests()
-
getDigestsForPlatform
public java.util.List<java.lang.String> getDigestsForPlatform(java.lang.String architecture, java.lang.String os)
Description copied from interface:ManifestListTemplate
Returns a list of digests for a specific platform found in the manifest list. see https://docs.docker.com/registry/spec/manifest-v2-2/#manifest-list- Specified by:
getDigestsForPlatform
in interfaceManifestListTemplate
- Parameters:
architecture
- the architecture of the target platformos
- the os of the target platform- Returns:
- a list of matching digests
-
-