I have a Kafka Streams application set-up as a service in Docker Compose file where the
test command in
healthcheck is set-up as
curl http://localhost:8080/q/health/ready || exit 1. A few questions on this set-up.
- Who executes the
dockeron host? If yes, then
8080in the container must be exposed. Further,
wgetshould be available in the host and not in the container image. Correct?
testcommand above means that
exit 1will be run if
curlreturns non-zero exit code. Whereas, the health-check end-point will respond with a HTTP status code. Where does the translation of HTTP status code or semantics of
DOWNinto shell exit codes happen?
- This link has various return codes from
curl. Exit status - Everything curl. I don’t follow why a
curlto a simple REST end-point may return any of the non-zero return code and therefore, trigger
- Conversely, I don’t follow how a
GETreturning a HTTP status code is translated into a non-zero return code triggering
Can you please explain?