podman icon indicating copy to clipboard operation
podman copied to clipboard

Cannot use --force-compression with --format v2s2

Open Jamstah opened this issue 5 months ago • 3 comments

Issue Description

Can't use those two options together. The compression type is unset when the format is v2s2, which means force-compression can't work because there is no compression type to force.

Steps to reproduce the issue

podman push registry.io/image:test --compression-format gzip --format v2s2

(setting a compression format automatically turns on force compression)

Describe the results you received

Error: cannot use ForceCompressionFormat with undefined default compression format

Describe the results you expected

Successful push forcing gzip compression

podman info output

On an apple silicon mac: https://github.com/containers/podman/issues/23942#issuecomment-2349139907

Podman in a container

No

Privileged Or Rootless

None

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

I expect we need to add another condition here so that if the compression type is set to gzip, it doesn't unset it.

https://github.com/containers/common/blob/main/libimage/push.go#L90

Jamstah avatar Sep 12 '24 13:09 Jamstah