Back to list

Docker Health Check

Lv.3130@mukitaro0 playsJan 2, 2026

Docker HEALTHCHECK script pattern. Exit 0 means healthy, exit 1 means unhealthy.

preview.shell
Shell
1if curl -sf http://localhost:8080/health; then
2 echo "Service is healthy"
3 exit 0
4else
5 echo "Service is unhealthy"
6 exit 1
7fi

Custom problems are not included in rankings