Skip to content

Commit

Permalink
Merge pull request #3899 from afbjorklund/reference
Browse files Browse the repository at this point in the history
Use Reference, allow caching images with both Tag and Digest
  • Loading branch information
afbjorklund authored Apr 12, 2019
2 parents 6b0ce64 + 7530fcb commit 2f1929f
Show file tree
Hide file tree
Showing 33 changed files with 1,017 additions and 421 deletions.
6 changes: 4 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/minikube/machine/cache_images.go
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,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")
}
Expand All @@ -317,7 +317,7 @@ func CacheImage(image, dst string) error {
if err != nil {
return err
}
err = tarball.Write(tag, img, nil, f)
err = tarball.Write(ref, img, f)
if err != nil {
return err
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2f1929f

Please sign in to comment.