Skip to content
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

Add curl to image for use native HEALTHCHECK #33

Open
4n70w4 opened this issue Jul 3, 2020 · 4 comments
Open

Add curl to image for use native HEALTHCHECK #33

4n70w4 opened this issue Jul 3, 2020 · 4 comments

Comments

@4n70w4
Copy link

4n70w4 commented Jul 3, 2020

No description provided.

@JaneJeon
Copy link

Would love this as well. Some form of built-in healthcheck would be nice.

@viharm
Copy link

viharm commented Jul 23, 2023

Yes, it would be good to have any form of healthcheck.

@pduchnovsky
Copy link

pduchnovsky commented Nov 10, 2023

in the meantime you guys could do this (dockerfile_inline works in newer docker-compose versions):

version: '2.4'
services:
  whoami:
    container_name: whoami
    build:
      context: .
      dockerfile_inline: |
        FROM traefik/whoami
        COPY --from=ghcr.io/tarampampam/curl /bin/curl /curl
        HEALTHCHECK --interval=10s --start-period=2s CMD ["/curl", "--fail", "http://127.0.0.1:80/health"]
    restart: always

I Opened PR #81

acouvreur added a commit to sablierapp/sablier that referenced this issue Jul 7, 2024
…mi:v1.5.0

This image simply retrieve the curl binary from curlimages/curl:8.8.0 to be able to add proper docker healthcheck commands.

Once this is merged with traefik/whoami, I'll update back to the original image.

See traefik/whoami#33
acouvreur added a commit to sablierapp/sablier that referenced this issue Jul 7, 2024
…mi:v1.5.0

This image simply retrieve the curl binary from curlimages/curl:8.8.0 to be able to add proper docker healthcheck commands.

Once this is merged with traefik/whoami, I'll update back to the original image.

See traefik/whoami#33
acouvreur added a commit to sablierapp/sablier that referenced this issue Jul 8, 2024
…#350)

When an instance does not exist yet and needs to be started, its status is not assumed to be starting anymore.

Instead, the statue will be retrieved from the provider. This changes one thing, it's that you may be able to start and access your services instantly because they'll be instantly seen as ready.

With this change, you might want to make sure that your containers have a proper healthcheck used to determine when the application is able to process incoming requests.

* refactor: add interface guards

* refactor(providers): remove instance.State as a return value from Stop and Start

* test(e2e): add healthcheck on nginx container

Because now the container check is so fast, we need to add a delay on which the container is considered started and healthy to have a proper waiting page.

* fix(tests): using acouvreur/whoami:v1.10.2 instead of containous/whoami:v1.5.0

This image simply retrieve the curl binary from curlimages/curl:8.8.0 to be able to add proper docker healthcheck commands.

Once this is merged with traefik/whoami, I'll update back to the original image.

See traefik/whoami#33
acouvreur added a commit to sablierapp/sablier that referenced this issue Oct 2, 2024
…#350)

When an instance does not exist yet and needs to be started, its status is not assumed to be starting anymore.

Instead, the statue will be retrieved from the provider. This changes one thing, it's that you may be able to start and access your services instantly because they'll be instantly seen as ready.

With this change, you might want to make sure that your containers have a proper healthcheck used to determine when the application is able to process incoming requests.

* refactor: add interface guards

* refactor(providers): remove instance.State as a return value from Stop and Start

* test(e2e): add healthcheck on nginx container

Because now the container check is so fast, we need to add a delay on which the container is considered started and healthy to have a proper waiting page.

* fix(tests): using acouvreur/whoami:v1.10.2 instead of containous/whoami:v1.5.0

This image simply retrieve the curl binary from curlimages/curl:8.8.0 to be able to add proper docker healthcheck commands.

Once this is merged with traefik/whoami, I'll update back to the original image.

See traefik/whoami#33
@jonasgeiler
Copy link

jonasgeiler commented Oct 26, 2024

I think it would be easier to just add a flag to the CLI which does a request to the /health endpoint and returns with success or failure.
I also described this in #81.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants