mirror of
https://github.com/containers/skopeo.git
synced 2026-07-13 12:09:34 +00:00
Don't bother setting redundant image names
When we pull down an image to use as a starting point, we no longer need to attach any additional names to it, as the image library can now find it correctly without requiring us to do so. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> Closes: #99 Approved by: rhatdan
This commit is contained in:
committed by
Atomic Bot
parent
4d155b93b4
commit
6d03588e83
14
pull.go
14
pull.go
@@ -55,19 +55,5 @@ func pullImage(store storage.Store, options BuilderOptions, sc *types.SystemCont
|
||||
logrus.Debugf("copying %q to %q", spec, name)
|
||||
|
||||
err = copy.Image(policyContext, destRef, srcRef, getCopyOptions())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Go find the image, and attach the requested name to it, so that we
|
||||
// can more easily find it later, even if the destination reference
|
||||
// looks different.
|
||||
destImage, err := is.Transport.GetStoreImage(store, destRef)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
names := append(destImage.Names, options.FromImage, name)
|
||||
err = store.SetNames(destImage.ID, names)
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user