mirror of
https://github.com/containers/skopeo.git
synced 2025-07-05 02:47:32 +00:00
Merge pull request #684 from tych0/add-oci-allow-uncompressed-flag
copy: add a CLI flag for OCIAcceptUncompressedLayers
This commit is contained in:
commit
0d471d146c
@ -155,6 +155,7 @@ type imageDestOptions struct {
|
|||||||
*imageOptions
|
*imageOptions
|
||||||
osTreeTmpDir string // A directory to use for OSTree temporary files
|
osTreeTmpDir string // A directory to use for OSTree temporary files
|
||||||
dirForceCompression bool // Compress layers when saving to the dir: transport
|
dirForceCompression bool // Compress layers when saving to the dir: transport
|
||||||
|
ociAcceptUncompressedLayers bool // Whether to accept uncompressed layers in the oci: transport
|
||||||
}
|
}
|
||||||
|
|
||||||
// imageDestFlags prepares a collection of CLI flags writing into imageDestOptions, and the managed imageDestOptions structure.
|
// imageDestFlags prepares a collection of CLI flags writing into imageDestOptions, and the managed imageDestOptions structure.
|
||||||
@ -173,6 +174,11 @@ func imageDestFlags(global *globalOptions, shared *sharedImageOptions, flagPrefi
|
|||||||
Usage: "Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)",
|
Usage: "Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)",
|
||||||
Destination: &opts.dirForceCompression,
|
Destination: &opts.dirForceCompression,
|
||||||
},
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: flagPrefix + "oci-accept-uncompressed-layers",
|
||||||
|
Usage: "Allow uncompressed image layers when saving to an OCI image using the 'oci' transport. (default is to compress things that aren't compressed)",
|
||||||
|
Destination: &opts.ociAcceptUncompressedLayers,
|
||||||
|
},
|
||||||
}...), &opts
|
}...), &opts
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -186,6 +192,7 @@ func (opts *imageDestOptions) newSystemContext() (*types.SystemContext, error) {
|
|||||||
|
|
||||||
ctx.OSTreeTmpDirPath = opts.osTreeTmpDir
|
ctx.OSTreeTmpDirPath = opts.osTreeTmpDir
|
||||||
ctx.DirForceCompress = opts.dirForceCompression
|
ctx.DirForceCompress = opts.dirForceCompression
|
||||||
|
ctx.OCIAcceptUncompressedLayers = opts.ociAcceptUncompressedLayers
|
||||||
return ctx, err
|
return ctx, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ _skopeo_copy() {
|
|||||||
--remove-signatures
|
--remove-signatures
|
||||||
--src-no-creds
|
--src-no-creds
|
||||||
--dest-no-creds
|
--dest-no-creds
|
||||||
|
--dest-oci-accept-uncompressed-layers
|
||||||
"
|
"
|
||||||
|
|
||||||
local transports="
|
local transports="
|
||||||
|
@ -34,6 +34,8 @@ If the authorization state is not found there, $HOME/.docker/config.json is chec
|
|||||||
|
|
||||||
**--dest-compress** _bool-value_ Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)
|
**--dest-compress** _bool-value_ Compress tarball image layers when saving to directory using the 'dir' transport. (default is same compression type as source)
|
||||||
|
|
||||||
|
**--dest-oci-accept-uncompressed-layers** _bool-value_ Allow uncompressed image layers when saving to an OCI image using the 'oci' transport. (default is to compress things that aren't compressed)
|
||||||
|
|
||||||
**--dest-creds** _username[:password]_ for accessing the destination registry
|
**--dest-creds** _username[:password]_ for accessing the destination registry
|
||||||
|
|
||||||
**--src-cert-dir** _path_ Use certificates at _path_ (*.crt, *.cert, *.key) to connect to the source registry or daemon
|
**--src-cert-dir** _path_ Use certificates at _path_ (*.crt, *.cert, *.key) to connect to the source registry or daemon
|
||||||
|
Loading…
Reference in New Issue
Block a user