image

package
v1.14.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrGithubNeedsLogin error

ErrGithubNeedsLogin is thrown when user needs to login specifically to github packages)

View Source
var ErrNeedsLogin error

ErrNeedsLogin is thrown when registry needs login (a general error)

Functions

func DeleteFromCacheDir

func DeleteFromCacheDir(images []string) error

DeleteFromCacheDir deletes tar files stored in cache dir

func DigestByDockerLib

func DigestByDockerLib(imgClient *client.Client, imgName string) string

DigestByDockerLib uses client by docker lib to return image digest img.ID in as same as image digest

func DigestByGoLib

func DigestByGoLib(imgName string) string

DigestByGoLib gets image digest uses go-containerregistry lib which is 4s slower thabn local daemon per lookup https://github.com/google/go-containerregistry/issues/627

func ExistsImageInDaemon added in v1.10.0

func ExistsImageInDaemon(img string) bool

ExistsImageInDaemon if img exist in local docker daemon

func LoadFromTarball added in v1.12.0

func LoadFromTarball(binary, img string) error

LoadFromTarball checks if the image exists as a tarball and tries to load it to the local daemon TODO: Pass in if we are loading to docker or podman so this function can also be used for podman

func SaveToDir

func SaveToDir(images []string, cacheDir string) error

SaveToDir will cache images on the host

The cache directory currently caches images using the imagename_tag For example, k8s.gcr.io/kube-addon-manager:v6.5 would be stored at $CACHE_DIR/k8s.gcr.io/kube-addon-manager_v6.5

func Tag added in v1.12.0

func Tag(img string) string

Tag returns just the image with the tag eg image:tag@sha256:digest -> image:tag if there is an associated tag if not possible, just return the initial img

func WriteImageToDaemon added in v1.8.0

func WriteImageToDaemon(img string) error

WriteImageToDaemon write img to the local docker daemon

Types

This section is empty.

Jump to

Keyboard shortcuts

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