diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-12-03 14:16:52 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-03 14:16:52 +0100 |
commit | 0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1 (patch) | |
tree | 1b651ab8c67e8e9f4ad8da27a879c19ee3b6b237 /pkg | |
parent | a6d1220ac08456dcc075b85b168def3ffeadb58d (diff) | |
parent | bd9f8815e1fc56c188668509025741a93649ca05 (diff) | |
download | podman-0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1.tar.gz podman-0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1.tar.bz2 podman-0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1.zip |
Merge pull request #12486 from giuseppe/use-configured-compression-format
cmd, push: use the configured compression format
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/infra/abi/images.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pkg/domain/infra/abi/images.go b/pkg/domain/infra/abi/images.go index 7a3451a7d..4346182d6 100644 --- a/pkg/domain/infra/abi/images.go +++ b/pkg/domain/infra/abi/images.go @@ -306,8 +306,16 @@ func (ir *ImageEngine) Push(ctx context.Context, source string, destination stri pushOptions.SignBy = options.SignBy pushOptions.InsecureSkipTLSVerify = options.SkipTLSVerify - if options.CompressionFormat != "" { - algo, err := compression.AlgorithmByName(options.CompressionFormat) + compressionFormat := 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 { return err } |