While trying to find a reliable way to compute the disk image size for images and while I found the right approach for docker, I discovered that podman does not support the same option, making harder to keep the build script cross compatible.
To give some insights, the .Size reported by inspect commands is NOT a reliable way to get information about image size because it will report different values for the same image when some layers are shared across multiple images.
We wanted a reliable way to measure the size that does not involve using save to export the image, as that is quite time consuming.
Steps to reproduce the issue
podman system df -v --format "{{ json . }}"
Error: cannot combine --format and --verbose flags
Some command with docker works fine, producing an usable json file.
Describe the results you received
Describe the results you received-
Describe the results you expected
Be able to get a JSON file compatible with the one produced by docker command.
Issue Description
While trying to find a reliable way to compute the disk image size for images and while I found the right approach for docker, I discovered that podman does not support the same option, making harder to keep the build script cross compatible.
To give some insights, the
.Size
reported byinspect
commands is NOT a reliable way to get information about image size because it will report different values for the same image when some layers are shared across multiple images.We wanted a reliable way to measure the size that does not involve using
save
to export the image, as that is quite time consuming.Steps to reproduce the issue
Some command with docker works fine, producing an usable json file.
Describe the results you received
Describe the results you received-
Describe the results you expected
Be able to get a JSON file compatible with the one produced by docker command.
podman info output
Podman in a container
No
Privileged Or Rootless
None
Upstream Latest Release
Yes
Additional environment details
Additional environment details
Additional information
Practical example for extracting effective image size given an image ID: