package archive
import "github.com/containerd/containerd/images/archive"
Package archive provides a Docker and OCI compatible importer
Index ¶
- func AddRefPrefix(image string) func(string) string
- func DigestTranslator(prefix string) func(digest.Digest) string
- func FilterRefPrefix(image string) func(string) string
- func ImportIndex(ctx context.Context, store content.Store, reader io.Reader) (ocispec.Descriptor, error)
Functions ¶
func AddRefPrefix ¶
AddRefPrefix prepends the given image prefix to tag-only references, while leaving returning full references unmodified.
func DigestTranslator ¶
DigestTranslator creates a digest reference by adding the digest to an image name
func FilterRefPrefix ¶
FilterRefPrefix restricts references to having the given image prefix. Tag-only references will have the prefix prepended.
func ImportIndex ¶
func ImportIndex(ctx context.Context, store content.Store, reader io.Reader) (ocispec.Descriptor, error)
ImportIndex imports an index from a tar archive image bundle
- implements Docker v1.1, v1.2 and OCI v1.
- prefers OCI v1 when provided
- creates OCI index for Docker formats
- normalizes Docker references and adds as OCI ref name e.g. alpine:latest -> docker.io/library/alpine:latest
- existing OCI reference names are untouched
- TODO: support option to compress layers on ingest
Source Files ¶
- Version
- v1.2.3
- Published
- Feb 6, 2019
- Platform
- js/wasm
- Imports
- 17 packages
- Last checked
- 20 minutes ago –
Tools for package owners.