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

Consider using service healthcheck in Dockerfile #1543

Closed
dborovcanin opened this issue Jan 12, 2022 · 4 comments
Closed

Consider using service healthcheck in Dockerfile #1543

dborovcanin opened this issue Jan 12, 2022 · 4 comments

Comments

@dborovcanin
Copy link
Collaborator

ENHANCEMENT

  1. Describe the enhancement you are requesting.
    We should consider using internal health check endpoints for exposing in Dockerfile like it's mentioned here.
  2. Indicate the importance of this enhancement to you (must-have, should-have, nice-to-have).
    This is a should-have enhancemenet.
@dborovcanin
Copy link
Collaborator Author

The only problem I see is that we need an external HTTP client to use our HTTP API health check endpoint (like in this example) and we are using scratch as a base image. However, there is always an option to create a simple Go binary instead of using tools such as curl.

@blokovi
Copy link
Contributor

blokovi commented Jan 12, 2022

What I found interesting is that official docker images on docker hub do NOT have healtcheks.
Here are the reasons: https://github.com/docker-library/faq#healthcheck

Also, healthchecks can be implemented in docker-compose, instead of in docker images, so given these reasons it may be better to use it there instead of Dockerfile

@dborovcanin
Copy link
Collaborator Author

What I found interesting is that official docker images on docker hub do NOT have healtcheks. Here are the reasons: https://github.com/docker-library/faq#healthcheck

Also, healthchecks can be implemented in docker-compose, instead of in docker images, so given these reasons it may be better to use it there instead of Dockerfile

These reasons sound sane to me. That is, we leave health checking to the user, and provide an endpoint that can be used for that. If @mainflux/maintainers agree, I will close this one.

@dborovcanin
Copy link
Collaborator Author

Closing this one due to reasons @blokovi explained in the comment.

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

No branches or pull requests

2 participants