Hey everyone,
I’ve been trying to inspect the health of every docker container that is currently running and I am having some issues when trying to execute the command docker container inspect -f '{{.State.Health.Status}}' <container name>
.
Sometimes it returns the state while at other times it just results in a template parsing error, which says that there is no entry for key “Health” looking something like this:
Template parsing error: template: :1:9: executing "" at <.State.Health.Status>: map has no entry for key "Health"
Does anyone have an idea why docker container inspect
behaves like this at times? Can I somehow force a container to have an entry for Health?
I am using Docker Desktop for Windows Version 4.1.1 with the WSL 2 based engine
Thanks in advance