Skip to content

Commit 7530fcb

Browse files
committed
Allow both tag and digest, for the cache images
1 parent bec7074 commit 7530fcb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/minikube/machine/cache_images.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -303,12 +303,12 @@ func CacheImage(image, dst string) error {
303303
return errors.Wrapf(err, "making cache image directory: %s", dst)
304304
}
305305

306-
tag, err := name.NewTag(image, name.WeakValidation)
306+
ref, err := name.ParseReference(image, name.WeakValidation)
307307
if err != nil {
308308
return errors.Wrap(err, "creating docker image name")
309309
}
310310

311-
img, err := remote.Image(tag, remote.WithAuthFromKeychain(authn.DefaultKeychain))
311+
img, err := remote.Image(ref, remote.WithAuthFromKeychain(authn.DefaultKeychain))
312312
if err != nil {
313313
return errors.Wrap(err, "fetching remote image")
314314
}
@@ -318,7 +318,7 @@ func CacheImage(image, dst string) error {
318318
if err != nil {
319319
return err
320320
}
321-
err = tarball.Write(tag, img, f)
321+
err = tarball.Write(ref, img, f)
322322
if err != nil {
323323
return err
324324
}

0 commit comments

Comments
 (0)