Documentation ¶
Overview ¶
Package schema1 provides definitions for the deprecated Docker Image Manifest v2, Schema 1 specification.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification. This package should not be used for purposes other than backward compatibility.
Index ¶
- Constants
- Variables
- func MakeV1ConfigFromConfig(configJSON []byte, v1ID, parentV1ID string, throwaway bool) ([]byte, error)deprecated
- func NewConfigManifestBuilder(bs distribution.BlobService, pk libtrust.PrivateKey, ref reference.Named, ...) distribution.ManifestBuilderdeprecated
- func NewReferenceManifestBuilder(pk libtrust.PrivateKey, ref reference.Named, architecture string) distribution.ManifestBuilderdeprecated
- func Verify(sm *SignedManifest) ([]libtrust.PublicKey, error)deprecated
- func VerifyChains(sm *SignedManifest, ca *x509.CertPool) ([][]*x509.Certificate, error)deprecated
- type FSLayerdeprecated
- type Historydeprecated
- type Manifestdeprecated
- type Referencedeprecated
- type SignedManifestdeprecated
- func (sm *SignedManifest) MarshalJSON() ([]byte, error)deprecated
- func (sm SignedManifest) Payload() (string, []byte, error)deprecated
- func (sm SignedManifest) References() []distribution.Descriptordeprecated
- func (sm *SignedManifest) Signatures() ([][]byte, error)deprecated
- func (sm *SignedManifest) UnmarshalJSON(b []byte) errordeprecated
Constants ¶
const MediaTypeManifest = "application/vnd.docker.distribution.manifest.v1+json"
MediaTypeManifest specifies the mediaType for the current version. Note that for schema version 1, the the media is optionally "application/json".
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
const MediaTypeManifestLayer = "application/vnd.docker.container.image.rootfs.diff+x-gtar"
MediaTypeManifestLayer specifies the media type for manifest layers
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
const MediaTypeSignedManifest = "application/vnd.docker.distribution.manifest.v1+prettyjws"
MediaTypeSignedManifest specifies the mediatype for current SignedManifest version
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
Variables ¶
var SchemaVersion = manifest.Versioned{
SchemaVersion: 1,
}
SchemaVersion provides a pre-initialized version structure for this packages version of the manifest.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
Functions ¶
func MakeV1ConfigFromConfig
deprecated
func MakeV1ConfigFromConfig(configJSON []byte, v1ID, parentV1ID string, throwaway bool) ([]byte, error)
MakeV1ConfigFromConfig creates an legacy V1 image config from image config JSON.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func NewConfigManifestBuilder
deprecated
func NewConfigManifestBuilder(bs distribution.BlobService, pk libtrust.PrivateKey, ref reference.Named, configJSON []byte) distribution.ManifestBuilder
NewConfigManifestBuilder is used to build new manifests for the current schema version from an image configuration and a set of descriptors. It takes a BlobService so that it can add an empty tar to the blob store if the resulting manifest needs empty layers.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015, use Docker Image Manifest v2, Schema 2, or the OCI Image Specification v1. This package should not be used for purposes other than backward compatibility.
func NewReferenceManifestBuilder
deprecated
func NewReferenceManifestBuilder(pk libtrust.PrivateKey, ref reference.Named, architecture string) distribution.ManifestBuilder
NewReferenceManifestBuilder is used to build new manifests for the current schema version using schema1 dependencies.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func Verify
deprecated
func Verify(sm *SignedManifest) ([]libtrust.PublicKey, error)
Verify verifies the signature of the signed manifest returning the public keys used during signing.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func VerifyChains
deprecated
func VerifyChains(sm *SignedManifest, ca *x509.CertPool) ([][]*x509.Certificate, error)
VerifyChains verifies the signature of the signed manifest against the certificate pool returning the list of verified chains. Signatures without an x509 chain are not checked.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
Types ¶
type FSLayer
deprecated
type FSLayer struct {
// BlobSum is the tarsum of the referenced filesystem image layer
BlobSum digest.Digest `json:"blobSum"`
}
FSLayer is a container struct for BlobSums defined in an image manifest.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
type History
deprecated
type History struct { // V1Compatibility is the raw v1 compatibility information V1Compatibility string `json:"v1Compatibility"` }
History stores unstructured v1 compatibility information.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
type Manifest
deprecated
type Manifest struct { manifest.Versioned // Name is the name of the image's repository Name string `json:"name"` // Tag is the tag of the image specified by this manifest Tag string `json:"tag"` // Architecture is the host architecture on which this image is intended to // run Architecture string `json:"architecture"` // FSLayers is a list of filesystem layer blobSums contained in this image FSLayers []FSLayer `json:"fsLayers"` // History is a list of unstructured historical data for v1 compatibility History []History `json:"history"` }
Manifest provides the base accessible fields for working with V2 image format in the registry.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
type Reference
deprecated
type Reference struct { Digest digest.Digest Size int64 // if we know it, set it for the descriptor. History History }
Reference describes a Manifest v2, schema version 1 dependency. An FSLayer associated with a history entry.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func (Reference) Descriptor
deprecated
func (r Reference) Descriptor() distribution.Descriptor
Descriptor describes a reference.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
type SignedManifest
deprecated
type SignedManifest struct { Manifest // Canonical is the canonical byte representation of the ImageManifest, // without any attached signatures. The manifest byte // representation cannot change or it will have to be re-signed. Canonical []byte `json:"-"` // contains filtered or unexported fields }
SignedManifest provides an envelope for a signed image manifest, including the format sensitive raw bytes.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func Sign
deprecated
func Sign(m *Manifest, pk libtrust.PrivateKey) (*SignedManifest, error)
Sign signs the manifest with the provided private key, returning a SignedManifest. This typically won't be used within the registry, except for testing.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func SignWithChain
deprecated
func SignWithChain(m *Manifest, key libtrust.PrivateKey, chain []*x509.Certificate) (*SignedManifest, error)
SignWithChain signs the manifest with the given private key and x509 chain. The public key of the first element in the chain must be the public key corresponding with the sign key.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func (*SignedManifest) MarshalJSON
deprecated
func (sm *SignedManifest) MarshalJSON() ([]byte, error)
MarshalJSON returns the contents of raw. If Raw is nil, marshals the inner contents. Applications requiring a marshaled signed manifest should simply use Raw directly, since the the content produced by json.Marshal will be compacted and will fail signature checks.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func (SignedManifest) Payload
deprecated
func (sm SignedManifest) Payload() (string, []byte, error)
Payload returns the signed content of the signed manifest.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func (SignedManifest) References
deprecated
func (sm SignedManifest) References() []distribution.Descriptor
References returns the descriptors of this manifests references.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func (*SignedManifest) Signatures
deprecated
func (sm *SignedManifest) Signatures() ([][]byte, error)
Signatures returns the signatures as provided by (*libtrust.JSONSignature).Signatures. The byte slices are opaque jws signatures.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.
func (*SignedManifest) UnmarshalJSON
deprecated
func (sm *SignedManifest) UnmarshalJSON(b []byte) error
UnmarshalJSON populates a new SignedManifest struct from JSON data.
Deprecated: Docker Image Manifest v2, Schema 1 is deprecated since 2015. Use Docker Image Manifest v2, Schema 2, or the OCI Image Specification.