-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
support configuring a Docker HEALTHCHECK #676
Comments
Hi @jack-kerouac , since the default base image When running on Kubernetes, no shell is needed as you can configure liveness and readiness probes directly. Closing but feel free to add additional comments if needed. |
Hello @coollog, i would like to question your assumtion, that by design, a shell is needed to run a HEALTHCHECK. The docs state that
So why should The main application contains code like this: |
@werty1st Thanks for the tip. Reopening to potentially address this with the exec form of |
HEALTHCHECK is very important for check container is healthy or not , especially for java service |
This would be super useful to have with ECS health checks. I'd love to see support added. |
tl;dr - if you feel strongly about health checks, comment on this OCI thread/submit a PR adding it to the spec to get a discussion going: opencontainers/image-spec#749 To give an update on this issue, we've been going back and forth as a team about whether or not to support health checks with Jib. Our thoughts so far are as follows:
If health checks are something people feel strongly about, this issue is currently open for adding it to the OCI spec. I would recommend reading through the thread/starting the discussion back up to get them added to the OCI spec if you feel you get a lot of value out of health checks. |
CIS-DI-0006 is raised because the resulting image has no HEALTHCHECK instruction. HEALTHCHECK is not part of the OCI spec, but is very Docker-specific. And, as commented in [1], Jib has no intention to support it, unless the core OCI spec supports it. Plus, Kubernetes makes use of its own Startup / Liveness / Readiness probes for health checks. [1] GoogleContainerTools/jib#676 (comment)
Description of the issue:
Support configuring a Docker HEALTHCHECK for the resulting Docker image.
Expected behavior:
The Jib configuration should allow adding a Docker
HEALTHCHECK
, includinginterval
,timeout
,start-period
,retries
, andCMD
to run.The text was updated successfully, but these errors were encountered: