mirror of
https://github.com/containers/podman.git
synced 2025-06-27 13:38:49 +08:00
cmd, push: use the configured compression format
[NO NEW TESTS NEEDED] I am just changing the default value Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
@ -306,8 +306,16 @@ func (ir *ImageEngine) Push(ctx context.Context, source string, destination stri
|
|||||||
pushOptions.SignBy = options.SignBy
|
pushOptions.SignBy = options.SignBy
|
||||||
pushOptions.InsecureSkipTLSVerify = options.SkipTLSVerify
|
pushOptions.InsecureSkipTLSVerify = options.SkipTLSVerify
|
||||||
|
|
||||||
if options.CompressionFormat != "" {
|
compressionFormat := options.CompressionFormat
|
||||||
algo, err := compression.AlgorithmByName(options.CompressionFormat)
|
if compressionFormat == "" {
|
||||||
|
config, err := ir.Libpod.GetConfigNoCopy()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
compressionFormat = config.Engine.CompressionFormat
|
||||||
|
}
|
||||||
|
if compressionFormat != "" {
|
||||||
|
algo, err := compression.AlgorithmByName(compressionFormat)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user