From 922ae92e43ae658651a781486bcd084294257699 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Sat, 9 Mar 2019 15:06:05 +0100 Subject: [PATCH] Allow both tag and digest, for the cache images --- pkg/minikube/machine/cache_images.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/minikube/machine/cache_images.go b/pkg/minikube/machine/cache_images.go index 6a048ae2017b..55e8bdfa19f2 100644 --- a/pkg/minikube/machine/cache_images.go +++ b/pkg/minikube/machine/cache_images.go @@ -297,12 +297,12 @@ func CacheImage(image, dst string) error { return errors.Wrapf(err, "making cache image directory: %s", dst) } - tag, err := name.NewTag(image, name.WeakValidation) + ref, err := name.ParseReference(image, name.WeakValidation) if err != nil { return errors.Wrap(err, "creating docker image name") } - img, err := remote.Image(tag, remote.WithAuthFromKeychain(authn.DefaultKeychain)) + img, err := remote.Image(ref, remote.WithAuthFromKeychain(authn.DefaultKeychain)) if err != nil { return errors.Wrap(err, "fetching remote image") } @@ -313,5 +313,5 @@ func CacheImage(image, dst string) error { return err } defer f.Close() - return tarball.Write(tag, img, f) + return tarball.Write(ref, img, f) }