Use docker/distribution v2.4.0+
Since the docker/distribution has a lot of changes we have to adapt code to use it.
* Adapt code to changes in the API.
* Add support of Manifest Version 2 Schema 2.
@@ -34,6 +34,12 @@ type Image struct {
DockerImageLayers []ImageLayer `json:"dockerImageLayers"`
// Signatures holds all signatures of the image.
Signatures []ImageSignature `json:"signatures,omitempty"`
+ // DockerImageSignatures provides the signatures as opaque blobs. This is a part of manifest schema v1.
+ DockerImageSignatures [][]byte `json:"dockerImageSignatures,omitempty"`
+ // DockerImageManifestMediaType specifies the mediaType of manifest. This is a part of manifest schema v2.
+ DockerImageManifestMediaType string `json:"dockerImageManifestMediaType,omitempty"`
+ // DockerImageConfig is a JSON blob that the runtime uses to set up the container. This is a part of manifest schema v2.
+ DockerImageConfig string `json:"dockerImageConfig,omitempty"`
}
// ImageLayer represents a single layer of the image. Some images may have multiple layers. Some may have none.
@@ -42,6 +48,8 @@ type ImageLayer struct {
Name string `json:"name"`
// Size of the layer in bytes as defined by the underlying store.
LayerSize int64 `json:"size"`
+ // MediaType of the referenced object.
+ MediaType string `json:"mediaType"`
}
// ImageSignature holds a signature of an image. It allows to verify image identity and possibly other claims
