summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-03 14:16:52 +0100
committerGitHub <noreply@github.com>2021-12-03 14:16:52 +0100
commit0c6f1c4fb13e22ca8e97dd93fba9160d7ef573a1 (patch)
tree1b651ab8c67e8e9f4ad8da27a879c19ee3b6b237 /pkg/domain/infra/abi
parenta6d1220ac08456dcc075b85b168def3ffeadb58d (diff)
parentbd9f8815e1fc56c188668509025741a93649ca05 (diff)
downloadpodman-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/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/images.go12
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
}