prevent snapshot from gc when unpack image
Signed-off-by: yanxuean <yan.xuean@zte.com.cn>
This commit is contained in:
parent
8e09b565a7
commit
545f247c8e
6
image.go
6
image.go
@ -86,6 +86,12 @@ func (i *image) IsUnpacked(ctx context.Context, snapshotterName string) (bool, e
|
||||
}
|
||||
|
||||
func (i *image) Unpack(ctx context.Context, snapshotterName string) error {
|
||||
ctx, done, err := i.client.withLease(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer done()
|
||||
|
||||
layers, err := i.getLayers(ctx, platforms.Default())
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user