Skip to content

Commit 7b0149a

Browse files
authored
Merge pull request #4820 from AkihiroSuda/additional-pull-opts
ctr: FetchConfig: allow setting additional []containerd.RemoteOpt
2 parents 1e624fa + 1febce4 commit 7b0149a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cmd/ctr/commands/content/fetch.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ type FetchConfig struct {
108108
Platforms []string
109109
// Whether or not download all metadata
110110
AllMetadata bool
111+
// RemoteOpts is not used by ctr, but can be used by other CLI tools
112+
RemoteOpts []containerd.RemoteOpt
111113
}
112114

113115
// NewFetchConfig returns the default FetchConfig from cli flags
@@ -172,6 +174,7 @@ func Fetch(ctx context.Context, client *containerd.Client, ref string, config *F
172174
containerd.WithImageHandler(h),
173175
containerd.WithSchema1Conversion,
174176
}
177+
opts = append(opts, config.RemoteOpts...)
175178

176179
if config.AllMetadata {
177180
opts = append(opts, containerd.WithAllMetadata())

0 commit comments

Comments
 (0)