Skip to content

Commit 23faecf

Browse files
Merge pull request #3505 from crosbymichael/remoteopts-unpack
Add UnpackOpts to RemoteContext
2 parents 1eb13fc + fe3638e commit 23faecf

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

client.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,9 @@ type RemoteContext struct {
298298
// afterwards. Unpacking is required to run an image.
299299
Unpack bool
300300

301+
// UnpackOpts handles options to the unpack call.
302+
UnpackOpts []UnpackOpt
303+
301304
// Snapshotter used for unpacking
302305
Snapshotter string
303306

pull.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (c *Client) Pull(ctx context.Context, ref string, opts ...RemoteOpt) (Image
6969
i := NewImageWithPlatform(c, img, pullCtx.PlatformMatcher)
7070

7171
if pullCtx.Unpack {
72-
if err := i.Unpack(ctx, pullCtx.Snapshotter); err != nil {
72+
if err := i.Unpack(ctx, pullCtx.Snapshotter, pullCtx.UnpackOpts...); err != nil {
7373
return nil, errors.Wrapf(err, "failed to unpack image on snapshotter %s", pullCtx.Snapshotter)
7474
}
7575
}

0 commit comments

Comments
 (0)