image

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 23 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 SaveToDir

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

SaveToDir will cache images on the host

The cache directory currently caches images using the imagename_tag For example, registry.k8s.io/kube-addon-manager:v6.5 would be stored at $CACHE_DIR/registry.k8s.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 TrimDockerIO added in v1.28.0

func TrimDockerIO(name string) string

Remove docker.io prefix since it won't be included in image names when we call `docker images`.

func UploadCachedImage added in v1.23.0

func UploadCachedImage(imgName string) error

UploadCachedImage uploads cached image

func UseDaemon added in v1.19.0

func UseDaemon(use bool)

UseDaemon is if we should look in local daemon for image ref

func UseRemote added in v1.19.0

func UseRemote(use bool)

UseRemote is if we should look in remote registry for image ref

Types

This section is empty.

Jump to

Keyboard shortcuts

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