images

package
v1.8.1-rc2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(nameOrId string)

func Exists

func Exists(ctx context.Context, nameOrID string) (bool, error)

Exists a lightweight way to determine if an image exists in local storage. It returns a boolean response.

func Export

func Export(ctx context.Context, nameOrID string, w io.Writer, format *string, compress *bool) error

Export saves an image from local storage as a tarball or image archive. The optional format parameter is used to change the format of the output.

func GetImage

func GetImage(ctx context.Context, nameOrID string, size *bool) (*inspect.ImageData, error)

Get performs an image inspect. To have the on-disk size of the image calculated, you can use the optional size parameter.

func History

func History(ctx context.Context, nameOrID string) ([]*handlers.HistoryResponse, error)

History returns the parent layers of an image.

func ImageTree

func ImageTree(ctx context.Context, nameOrId string) error

func Import added in v1.8.1

func Import(ctx context.Context, changes []string, message, reference, u *string, r io.Reader) (string, error)

Imports adds the given image to the local image store. This can be done by file and the given reader or via the url parameter. Additional metadata can be associated with the image by using the changes and message parameters. The image can also be tagged given a reference. One of url OR r must be provided.

func List

func List(ctx context.Context, all *bool, filters map[string][]string) ([]*handlers.ImageSummary, error)

List returns a list of images in local storage. The all boolean and filters parameters are optional ways to alter the image query.

func Load

func Load(ctx context.Context, r io.Reader, name *string) (string, error)

func Prune

func Prune(ctx context.Context, filters map[string][]string) ([]string, error)

Prune removes unused images from local storage. The optional filters can be used to further define which images should be pruned.

func Remove

func Remove(ctx context.Context, nameOrID string, force *bool) ([]map[string]string, error)

Remove deletes an image from local storage. The optional force parameter will forcibly remove the image by removing all all containers, including those that are Running, first.

func Search(ctx context.Context, term string, limit *int, filters map[string][]string) ([]image.SearchResult, error)

Search looks for the given image (term) in container image registries. The optional limit parameter sets a maximum number of results returned. The optional filters parameter allow for more specific image searches.

func Tag

func Tag(ctx context.Context, nameOrID, tag, repo string) error

Tag adds an additional name to locally-stored image. Both the tag and repo parameters are required.

Types

This section is empty.

Jump to

Keyboard shortcuts

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