schema1

package
v2.0.0-rc.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 24 Imported by: 1

Documentation

Overview

Package schema1 provides a converter to fetch an image formatted in Docker Image Manifest v2, Schema 1.

Deprecated: use images formatted in Docker Image Manifest v2, Schema 2, or OCI Image Spec v1.

Index

Constants

This section is empty.

Variables

View Source
var ErrDisabled = fmt.Errorf("Pulling Schema 1 images have been deprecated and disabled by default since containerd v2.0. "+
	"As a workaround you may set an environment variable `%s=1`, but this will be completely removed in containerd v2.1.",
	deprecation.EnvPullSchema1Image)

Functions

func ReadStripSignature

func ReadStripSignature(schema1Blob io.Reader) ([]byte, error)

ReadStripSignature reads in a schema1 manifest and returns a byte array with the "signatures" field stripped

Types

type ConvertOpt

type ConvertOpt func(context.Context, *ConvertOptions) error

ConvertOpt allows configuring a convert operation.

func UseDockerSchema2

func UseDockerSchema2() ConvertOpt

UseDockerSchema2 is used to indicate that a schema1 manifest should be converted into the media types for a docker schema2 manifest.

type ConvertOptions

type ConvertOptions struct {
	// ManifestMediaType specifies the media type of the manifest OCI descriptor.
	ManifestMediaType string

	// ConfigMediaType specifies the media type of the manifest config OCI
	// descriptor.
	ConfigMediaType string
}

ConvertOptions provides options on converting a docker schema1 manifest.

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

Converter converts schema1 manifests to schema2 on fetch

func NewConverter

func NewConverter(contentStore content.Store, fetcher remotes.Fetcher) (*Converter, error)

NewConverter returns a new converter

func (*Converter) Convert

func (c *Converter) Convert(ctx context.Context, opts ...ConvertOpt) (ocispec.Descriptor, error)

Convert a docker manifest to an OCI descriptor

func (*Converter) Handle

func (c *Converter) Handle(ctx context.Context, desc ocispec.Descriptor) ([]ocispec.Descriptor, error)

Handle fetching descriptors for a docker media type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL