image

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2024 License: Apache-2.0 Imports: 61 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(ctx context.Context, client *containerd.Client, srcRawRef, targetRawRef string, options types.ImageConvertOptions) error

func Crypt

func Crypt(ctx context.Context, client *containerd.Client, srcRawRef, targetRawRef string, encrypt bool, options types.ImageCryptOptions) error

func EnsureImage

func EnsureImage(ctx context.Context, client *containerd.Client, rawRef string, ocispecPlatforms []v1.Platform, pull string, unpack *bool, quiet bool, options types.ImagePullOptions) (*imgutil.EnsuredImage, error)

EnsureImage pulls an image either from ipfs or from registry.

func Inspect

func Inspect(ctx context.Context, client *containerd.Client, images []string, options types.ImageInspectOptions) error

Inspect prints detailed information of each image in `images`.

func List

func List(ctx context.Context, client *containerd.Client, filters, nameAndRefFilter []string) ([]images.Image, error)

List queries containerd client to get image list and only returns those matching given filters.

Supported filters: - before=<image>[:<tag>]: Images created before given image (exclusive) - since=<image>[:<tag>]: Images created after given image (exclusive) - label=<key>[=<value>]: Matches images based on the presence of a label alone or a label and a value - dangling=true: Filter images by dangling - reference=<image>[:<tag>]: Filter images by reference (Matches both docker compatible wildcard pattern and regexp

nameAndRefFilter has the format of `name==(<image>[:<tag>])|ID`, and they will be used when getting images from containerd, while the remaining filters are only applied after getting images from containerd, which means that having nameAndRefFilter may speed up the process if there are a lot of images in containerd.

func ListCommandHandler added in v1.2.1

func ListCommandHandler(ctx context.Context, client *containerd.Client, options types.ImageListOptions) error

ListCommandHandler `List` and print images matching filters in `options`.

func Load

func Load(ctx context.Context, client *containerd.Client, options types.ImageLoadOptions) error

func Prune added in v1.2.1

func Prune(ctx context.Context, client *containerd.Client, options types.ImagePruneOptions) error

Prune will remove all dangling images. If all is specified, will also remove all images not referenced by any container.

func Pull

func Pull(ctx context.Context, client *containerd.Client, rawRef string, options types.ImagePullOptions) error

Pull pulls an image specified by `rawRef`.

func Push

func Push(ctx context.Context, client *containerd.Client, rawRef string, options types.ImagePushOptions) error

Push pushes an image specified by `rawRef`.

func Remove

func Remove(ctx context.Context, client *containerd.Client, args []string, options types.ImageRemoveOptions) error

Remove removes a list of `images`.

func Save added in v1.2.1

func Save(ctx context.Context, client *containerd.Client, images []string, options types.ImageSaveOptions, exportOpts ...archive.ExportOpt) error

Save exports `images` to a `io.Writer` (e.g., a file writer, or os.Stdout) specified by `options.Stdout`.

func Tag

func Tag(ctx context.Context, client *containerd.Client, options types.ImageTagOptions) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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