diff --git a/client.go b/client.go index 76abed6c7..8ea7d7972 100644 --- a/client.go +++ b/client.go @@ -298,6 +298,9 @@ type RemoteContext struct { // afterwards. Unpacking is required to run an image. Unpack bool + // UnpackOpts handles options to the unpack call. + UnpackOpts []UnpackOpt + // Snapshotter used for unpacking Snapshotter string diff --git a/pull.go b/pull.go index 693dcafe1..3a91daba4 100644 --- a/pull.go +++ b/pull.go @@ -69,7 +69,7 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (Image i := NewImageWithPlatform(c, img, pullCtx.PlatformMatcher) if pullCtx.Unpack { - if err := i.Unpack(ctx, pullCtx.Snapshotter); err != nil { + if err := i.Unpack(ctx, pullCtx.Snapshotter, pullCtx.UnpackOpts...); err != nil { return nil, errors.Wrapf(err, "failed to unpack image on snapshotter %s", pullCtx.Snapshotter) } }