Repository navigation
Replies: 9 comments 2 replies
|
See #17273 and other similar discussions / issues. You may create a custom image if you need curl. There are no plans to add it to the base image. |
|
So everyone who uses Docker Swarm and similar platforms have to create their own Image? That doesn't seem logical. |
|
If the container doesn't want to ship curl then they should still ship an official "healthcheck.sh" command. You can't except people to run the official container in production without it. |
|
@TheKnarf you free to raise an enhancement about what a shell based health check would look like. You can also see a recent discussion about using just shell commands, but it is applicable to situations with http enabled #38131 While that pr wasn't committed you may consider using that along with leaving http enabled - even if you intend to be behind a reencrypt or passthrough proxy. Just don't generally expose the http port. |
|
I think there should just be a |
|
@shawkins - I suppose we could add a minimal HTTP client that would execute a HTTP get request to a URL provided as a parameter as a new command. It would be handled on the Picoli side of things, and wouldn't start up Quarkus. It could look like: Starting up Java would be expensive, still it would come out-of-the box without additional CVEs. To minimize the overhead, we could wrap it a single class like the following. Note that I tested it with We should run it with some (static) JVM and a fixed memory size to avoid situations where it runs off with too much memory. WDYT? |
|
We've discussed it in the past, IIRC. My thought here would be that using a Java client for probes is not ideal due to performace (spinning up another JVM for every probes ping). Possibly native mode would help. |
|
I agree it is not ideal, but I doubt we would have a native mode soon (which we would need to compile for two architectures ARM and non-ARM, which is IMHO a pain). So maybe the non-native Java option is good enough? |
|
Moved to a discussion.
I would keep it as a separate script as to not clutter kc.sh / kc.bat - if anything I'd like to remove more logic from those scripts.
It's not too far of a stretch to make #38131 work for this purpose in general. If we expanded our healthchecks to also check the health our https interface (might not work when client auth is required), then a health check against the management port configured for http would be good enough - and not require a separate java process launch. If you are in edge mode, typically only http will be enabled - and https won't need to be tested regardless. If you are in passthrough or reencrypt, then the management interface could be left as http - but we currently missing a configuration option for that. For these situations we can recommend using localhost as the management host so that it is not broadly accessible. Only if someone truly wants to expose the management interface as https would there be a problem - even then we could consider still exposing a limited health check over http and rely upon quarkusio/quarkus#47531 to keep the main http interface exposed only to localhost. Are we sure that we're making the right assumptions with effectively securing the management port by default when https is enabled? |
- Heading
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
Some platform needs
curlto do healthchecks. They'll use the Docker image itself and run the healthcheck inside the image.A simple example might be Docker Compose where you want the following to work:
There is a discussion over here looking at other ways of doing it, but all of those seem wildly impractical, and it seems like it would make more sense for this to just ship with the image.
Discussion
No response
Motivation
It should be easy to setup health checks, some platforms require
curl(or a similar command) to exist in the Docker image to perform health checks (Docker Compose, Docker Swarm, etc).Details
Add
curlas an package to the official Docker image.All reactions