0

I have a docker container service-1 that does not support curl or wget or ping. The container does start up a service which is available on localhost:8080 when ready.

As I cannot write a curl health check for this container (due missing command), I need a nother solution to know, when this container is ready.

My idea was to use another container in the same network, which implements a healthcheck like so:

curl --fail service-1:8080 || exit 1

Sadly this seems not work. Can I execute a health check on container A that relies on another container?

Herr Derb
  • 4,977
  • 5
  • 34
  • 62
  • I'd create a new image that has the utilities needed to do a healthcheck in the container – Hans Kilian Mar 06 '23 at 13:56
  • Kubernetes is a large and complex environment and not appropriate for all workloads, but if you're using it, it natively supports HTTP-request health checks ("probes"). – David Maze Mar 06 '23 at 15:13

0 Answers0