Skip to content

Commit

Permalink
copier: add OciAcceptUncompressedLayers option
Browse files Browse the repository at this point in the history
Add an option to allow for accepting uncompressed layers when
copying OCI images.

Context: github.com/containers/podman/issues/11613
Signed-off-by: Valentin Rothberg <[email protected]>
  • Loading branch information
vrothberg committed Sep 21, 2021
1 parent bf187ad commit c94c959
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 @@ -65,6 +65,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 @@ -242,6 +244,9 @@ func (r *Runtime) newCopier(options *CopyOptions) (*copier, error) {
c.systemContext.DockerCertPath = options.CertDirPath
}

// 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 c94c959

Please sign in to comment.