-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podman inspect -t container --size myctr
not working
#4744
Comments
I think we expect |
If size is being shown, I'm losing it in all of the output and I'm not gronking it with grep:
|
Hm. I'll take a look |
If this issue is still available, I am happy to take it too. But when reading the comments and the issue description, I get confused: |
@NevilleC the man page says:
So in my book, we should only display the size of the container. I'll let @mheon correct that if necessary, and then we may need to also adjust the man page too. @NevilleC I've assigned the issue to you, thanks for hopping on to it! |
Per Docker, we should display the full output of inspect per usual, but actually populate the |
Currently, if a user requests the size on a container (inspect --size -t container), the SizeRw does not show up if the value is 0. It's because InspectContainerData is defined as int64 and there is an omit when empty. We do want to display it even if the value is empty. I have changed the type of SizeRw to be a pointer to an int64 instead of an int64. It will allow us todistinguish the empty value to the missing value. I updated the test "podman inspect container with size" to ensure we check thatSizeRw is displayed correctly. Closes containers#4744 Signed-off-by: NevilleC <[email protected]>
/kind bug
Description
The
--size
option in a command like:podman inspect -t container --size myctr
is being ignored. Instead of just the size being returned, the whole inspect output is instead shown.
Steps to reproduce the issue:
podman pull alpine
podman run --name=myctr alpine ls /etc/network
podman inspect --size -t container myctr
Describe the results you received:
Full inspect output of the container showing all fields and values.
Describe the results you expected:
Just the size of the container per the man page.
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: