-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About Docker HEALTHCHECK again #1350
Comments
I think more information is needed here. What doesn't work? Is it not putting the wget binary in the container? or is your healthcheck failing for some other reason? |
Sure. I've created a small Java/Kotlin application to demonstrate the issue: https://github.com/alex-arana/demo The project creates a Docker image out of a Kotlin Spring Boot app using a distroless base and packages |
I've added a branch called openjdk17-base-working to the demo repository which implements a working version of the Docker HEALTHCHECK. The only difference with the non-working version of the same project is using an openjdk:17 based image instead of a distroless image. |
What I've seen in very minimal images for healtchecks is invoking the language runtime for doing a http request. Check this supabase container for instance: |
I've also come across this issue. I ran with a debug image to try and get a better idea of what was going on, and it seems that |
Based on @jbergstroem comment I succesfully implemented that for Java/Kotlin: |
Following up on Issue #183 regarding implementation of Docker HEALTHCHECK within a distroless image, the accepted solution no longer appears to work.
As per one of the closing comments back in March, adding
wget
to a distroless image could be used to implement Docker HEALTHCHECK like so:However, this does not appear to work with the following distroless container images I have tested:
Has anyone else encountered this issue?
The text was updated successfully, but these errors were encountered: