support configuring a Docker HEALTHCHECK
See original GitHub issueDescription of the issue: Support configuring a Docker HEALTHCHECK for the resulting Docker image.
Expected behavior:
The Jib configuration should allow adding a Docker HEALTHCHECK
, including interval
, timeout
, start-period
, retries
, and CMD
to run.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to Use Docker's Health Check Command - Scout APM
To configure the health check in a Docker container, you need to configure it using the command HEALTHCHECK in the Dockerfile. There are...
Read more >Lab #14: Create a Docker Image with HEALTHCHECK ...
The HEALTHCHECK directive tells Docker how to determine if the state of the container is normal. This was a new directive introduced during...
Read more >How to Add a Health Check to Your Docker Container
Add a health check to the Dockerfile; See the health status; Configure the health check using a compose file; In conclusion.
Read more >How (and Why) to Add Health Checks to Your Docker ...
You configure container health checks in your Dockerfile . This accepts a command which the Docker daemon will execute every 30 seconds.
Read more >Health Check Command in Docker - Atatus
The HEALTHCHECK command is employed in the Dockerfile to configure the health check in a Docker container. In Docker, the HEALTHCHECK can be ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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: https://github.com/opencontainers/image-spec/issues/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:
interval
seconds).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.
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
HEALTHCHECK --interval=5m --timeout=3s CMD ["java", "-cp", "/app/resources/:/app/classes/:/app/libs/*", "com.company.content.feed.consumer.ContentFeedConsumerApplication", "health"]
not work?The main application contains code like this: if (args == health){ if checkfile.timestamp > 3600 exit(-1) else exit(0) }