-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
CURL and WGET missing from current container #3371
CURL and WGET missing from current container #3371
Comments
@dvasdekis Health checks are typically done from outside the container. We do not package curl or wget in the interest of keeping the image size lean. Can you give more hints on your use case? |
My guess is that @dvasdekis is interested in using the Docker built-in That said, I’m not actually that familiar with |
Correct @lexi-lambda - I'm personally using Docker-Compose, and in order to bring the containers up in the right order and ensure that they're available, the container has to be able to run a command that reports its health. In my case, I want this healthcheck to only be successful after the migrations have finished running. A command might be |
Looks like docker-compose recommends running a command inside the container to do health checks [ref]. @dvasdekis I just checked the latest image and What version are you on? |
I see it too now. I must have been on an old version. I'm so sorry, not sure why it didn't appear when I looked in the container I was running! |
For those looking to use |
For those interested, you can also use hasura healthcheck:
test: wget --no-verbose --tries=1 --spider http://0.0.0.0:8080/healthz || exit 1
interval: 5s
timeout: 5s
retries: 5 Related links: |
If anyone is still wanting to do hasura healthchecks with docker-compose, I've found an alternate solution using bash and commands that are available pretty much anywhere: healthcheck:
test: ["CMD", "bash", "-c", "exec 5<>/dev/tcp/127.0.0.1/8080 && echo -e 'GET /healthz HTTP/1.1\n\n' >&5 && cat <&5 | head -n 1 | grep 200"]
interval: 5s
timeout: 5s
retries: 3 |
Slightly more intensive, but I've seen this done as well.
|
Or instead of doing that every time, you could just add installing curl to your Dockerfile to only install during build |
Hey folks. It looks like both
curl
andwget
are missing from the current container? Neither are in/bin
, and additionally I get:Any idea where they've gone? They're a prerequisite for the health checks described here.
The text was updated successfully, but these errors were encountered: