Proposal: Add Health Check Support in nerdctl #4032
Replies: 2 comments 4 replies
-
This doesn't seem consistent with Docker.
Depending on systemd is the last resort, as not every distro uses systemd. As discussed before, the feature is similar to https://github.com/containerd/containerd/blob/v2.0.4/plugins/restart/monitor.go and could be implemented as another monitor plugin.
Healthchecking doesn't seem so high-level. Same as the restart monitor,
FYI: containerd v2.1 will be released relative soon: May 7 containerd v2.2 is planned to be released 6 months after v2.1.
Why? The restart monitor isn't aware of the image schema, so the story should be same for healthchecking too? |
Beta Was this translation helpful? Give feedback.
-
Thanks for getting back. Supporting health checks defined in Docker-built images would require containerd to recognize and parse Docker-specific extensions to the image schema, specifically the Healthcheck field embedded in the image config. The restart monitor, by contrast, operates independently of the image schema and relies solely on runtime task events like exit codes. Since the OCI image specification does not standardize health check configuration, containerd currently does not unmarshal this data. Enabling support would require either diverging from OCI compliance or introducing special-case handling for Docker-specific fields. |
Beta Was this translation helpful? Give feedback.
-
Hello,
We’d like to propose adding support for container health checks in nerdctl, similar to Docker’s health check functionality via Dockerfile, Compose, and CLI flags.
This feature would allow users and downstream clients like Finch to define and monitor application-level health of containers, enabling use cases such as container restarts on failure, basic orchestration, and service monitoring.
The attached PDF includes the detailed proposal plan. Looking forward to feedback and discussion!
Thanks!
Health Check Support in Nerdctl – Proposal.pdf
Previous discussion - #3149
cc @AkihiroSuda @djdongjin
Beta Was this translation helpful? Give feedback.
All reactions