2

Since distroless does not contain a shell or package manager, if I were to use gcr.io/distroless/java17-debian11, how would I implement something like

HEALTHCHECK --interval=5s --start-period=60s \
    CMD curl -sfo /dev/null http://localhost:8080/actuator/health

Also I'm on Docker Swarm so there's no "external http probe"

On a Java app/Spring Boot I can have multiple mains and one of them can connect to Spring actuator or some custom JMX endpoint that I had provided an answer for. However, that's extra custom code.

Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
  • Hi, any luck? I have similar problem [here](https://stackoverflow.com/questions/75962015/cannot-hit-a-health-check-endpoint-from-dockerized-spring-boot-app) – Wrapper Apr 08 '23 at 08:59
  • Having a custom JMX endpoint is actually helpful and you can have more complex tests for health. – Archimedes Trajano Apr 11 '23 at 17:55

0 Answers0