Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copier: add OciAcceptUncompressedLayers option #780

Merged
merged 1 commit into from
Sep 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libimage/copier.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ type CopyOptions struct {
// types. Short forms (e.g., oci, v2s2) used by some tools are not
// supported.
ManifestMIMEType string
// Accept uncompressed layers when copying OCI images.
OciAcceptUncompressedLayers bool
// If OciEncryptConfig is non-nil, it indicates that an image should be
// encrypted. The encryption options is derived from the construction
// of EncryptConfig object. Note: During initial encryption process of
Expand Down Expand Up @@ -255,6 +257,9 @@ func (r *Runtime) newCopier(options *CopyOptions) (*copier, error) {
c.systemContext.CompressionLevel = options.CompressionLevel
}

// NOTE: for the sake of consistency it's called Oci* in the CopyOptions.
c.systemContext.OCIAcceptUncompressedLayers = options.OciAcceptUncompressedLayers

policy, err := signature.DefaultPolicy(c.systemContext)
if err != nil {
return nil, err
Expand Down