Documentation ¶
Index ¶
- func Convert(ctx context.Context, client *containerd.Client, srcRawRef, targetRawRef string, ...) error
- func Crypt(ctx context.Context, client *containerd.Client, srcRawRef, targetRawRef string, ...) error
- func EnsureImage(ctx context.Context, client *containerd.Client, rawRef string, ...) (*imgutil.EnsuredImage, error)
- func Inspect(ctx context.Context, client *containerd.Client, images []string, ...) error
- func List(ctx context.Context, client *containerd.Client, ...) ([]images.Image, error)
- func ListCommandHandler(ctx context.Context, client *containerd.Client, options types.ImageListOptions) error
- func Load(ctx context.Context, client *containerd.Client, options types.ImageLoadOptions) error
- func Prune(ctx context.Context, client *containerd.Client, ...) error
- func Pull(ctx context.Context, client *containerd.Client, rawRef string, ...) error
- func Push(ctx context.Context, client *containerd.Client, rawRef string, ...) error
- func Remove(ctx context.Context, client *containerd.Client, args []string, ...) error
- func Save(ctx context.Context, client *containerd.Client, images []string, ...) error
- func Tag(ctx context.Context, client *containerd.Client, options types.ImageTagOptions) error
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.