Skip to content

Commit

Permalink
Merge pull request #780 from vrothberg/oci-uncompressed
Browse files Browse the repository at this point in the history
copier: add OciAcceptUncompressedLayers option
  • Loading branch information
openshift-merge-robot authored Sep 21, 2021
2 parents 61c922a + ae1e081 commit f2f10e6
Showing 1 changed file with 5 additions and 0 deletions.
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

0 comments on commit f2f10e6

Please sign in to comment.