Fix snapshotter getter in client code
Fixes #3312 Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
10
image.go
10
image.go
@@ -108,7 +108,10 @@ func (i *image) Config(ctx context.Context) (ocispec.Descriptor, error) {
|
||||
}
|
||||
|
||||
func (i *image) IsUnpacked(ctx context.Context, snapshotterName string) (bool, error) {
|
||||
sn := i.client.SnapshotService(snapshotterName)
|
||||
sn, err := i.client.getSnapshotter(snapshotterName)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
cs := i.client.ContentStore()
|
||||
|
||||
diffs, err := i.i.RootFS(ctx, cs, i.platform)
|
||||
@@ -140,13 +143,16 @@ func (i *image) Unpack(ctx context.Context, snapshotterName string) error {
|
||||
}
|
||||
|
||||
var (
|
||||
sn = i.client.SnapshotService(snapshotterName)
|
||||
a = i.client.DiffService()
|
||||
cs = i.client.ContentStore()
|
||||
|
||||
chain []digest.Digest
|
||||
unpacked bool
|
||||
)
|
||||
sn, err := i.client.getSnapshotter(snapshotterName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for _, layer := range layers {
|
||||
unpacked, err = rootfs.ApplyLayer(ctx, layer, chain, sn, a)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user