Documentation ¶
Index ¶
- Variables
- func DeleteFromCacheDir(images []string) error
- func DigestByDockerLib(imgClient *client.Client, imgName string) string
- func DigestByGoLib(imgName string) string
- func ExistsImageInDaemon(img string) bool
- func LoadFromTarball(binary, img string) error
- func SaveToDir(images []string, cacheDir string) error
- func Tag(img string) string
- func WriteImageToDaemon(img string) error
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 ExistsImageInDaemon ¶ added in v1.10.0
ExistsImageInDaemon if img exist in local docker daemon
func LoadFromTarball ¶ added in v1.12.0
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 ¶
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
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
WriteImageToDaemon write img to the local docker daemon
Types ¶
This section is empty.