repocli: first version of pull & push image
This commit is contained in:
@@ -21,7 +21,7 @@ func (down *Loader) Push(ctx context.Context, rawref, dir, osname, arch string)
|
||||
index := imager.Index()
|
||||
for _, descr := range index.Manifests {
|
||||
digstr := descr.Digest.String()
|
||||
|
||||
mime := descr.MediaType
|
||||
_, _, mandata, err := imager.ReadManifest(ctx, digstr)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -54,8 +54,10 @@ func (down *Loader) Push(ctx context.Context, rawref, dir, osname, arch string)
|
||||
return err
|
||||
}
|
||||
}
|
||||
err = down.cli.PutManifest(ctx, ref.Raw(), mandata, mime)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return err
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user