Understanding Failures
The main process exit code helps explain why a container stopped. A non-zero exit code generally indicates an error, although the meaning depends on the application.
Restart policies can restart failed containers, but they should not hide a persistent application bug. Fix the root cause and use health checks for service health rather than assuming a running process is healthy.