I have a problem with a container in which I run a python script.
Sometimes it happens that this python script crashes, but the container is still shown as healthy via docker ps, which means that the container does not restart.
Is there a way to detect such an error message?
Unfortunately I have not found anything yet.
Since there is no generic way to identify the heath state of containerized applications, you will need to implement the mechanics that identify the health state yourself and call them in your health check.