Documentation ¶
Index ¶
- Variables
- func DeleteFromCacheDir(images []string) error
- func DigestByDockerLib(imgClient *client.Client, imgName string) string
- func DigestByGoLib(imgName string) string
- func SaveToDir(images []string, cacheDir string, overwrite bool) error
- func Tag(img string) string
- func TrimDockerIO(name string) string
- func UploadCachedImage(imgName string) error
- func UseDaemon(use bool)
- func UseRemote(use bool)
Constants ¶
This section is empty.
Variables ¶
var ErrGithubNeedsLogin error
ErrGithubNeedsLogin is thrown when user needs to login specifically to github packages)
var ErrNeedsLogin error
ErrNeedsLogin is thrown when registry needs login (a general error)
Functions ¶
func DeleteFromCacheDir ¶
DeleteFromCacheDir deletes tar files stored in cache dir
func DigestByDockerLib ¶
DigestByDockerLib uses client by docker lib to return image digest img.ID in as same as image digest
func DigestByGoLib ¶
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 ¶
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
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
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
UploadCachedImage uploads cached image
Types ¶
This section is empty.