-
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
Healthcheck property of a container image cannot be printed via go template with podman inspect #14661
Comments
The key name is I recommend to use shell completion to get the names: |
Oh! Ok, that works. Could it be changed so that the names are consistent?
Hm, that doesn't work on my end on Fedora 35. |
I don't think we should change these field names. I have no experience with the image code but if |
That would be great if such an alias could be added. It would greatly help with portability. |
Getting @mheon @ashley-cui, I think this could be a good thing for interns in case you are looking for work items. |
@vrothberg In the context of Inspect, it's not an OCI config, it's a *define.InspectContainerConfig - which already includes a Healthcheck field. I'm surprised this isn't working already given that. |
The issue relates to |
A friendly reminder that this issue had no activity for 30 days. |
@vrothberg @mheon any movement on this one? |
No. My pipeline is long and full :^) |
Above PR closes this: #15424 , @vrothberg PTAL I think this is the place where we maintain all aliases. |
…bility Support inspecting image healthcheck using docker supported `.Config.HealthCheck` by aliasing field to `.HealthCheck` Now supports ```Console podman image inspect -f "{{.Config.Healthcheck}}" imagename ``` Closes: containers#14661 Signed-off-by: Aditya R <[email protected]>
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Podman understands the
HEALTHCHECK
property of container images and can output them viapodman image inspect
:However, it is not possible to use a go template for this, in contrast to other properties of the image like
Id
,History
, etc.:Steps to reproduce the issue:
podman inspect -f "{{.Healthcheck}}" url/to/any/image/with/HEALTHCHECK
Describe the results you received:
ERRO[0000] Error printing inspect output: template: all inspect:1:14: executing "all inspect" at <.Healthcheck>: can't evaluate field Healthcheck in type interface {}
Describe the results you expected:
what docker provides:
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Build from source and tried with
podman-3.4.7-1.fc35.x86_64
as wellHave you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
The text was updated successfully, but these errors were encountered: