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

[ECS/Fargate][bug]: Dockerfile healthcheck is ignored #1443

Closed
paya-cz opened this issue Jul 18, 2021 · 2 comments
Closed

[ECS/Fargate][bug]: Dockerfile healthcheck is ignored #1443

paya-cz opened this issue Jul 18, 2021 · 2 comments
Labels
Proposed Community submitted issue

Comments

@paya-cz
Copy link

paya-cz commented Jul 18, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Tell us about your request

Using HEALTHCHECK instruction in Dockerfile is ignored by Fargate. The health status does not appear in the AWS Console, and the task will not get killed even if I make the healthcheck always fail. If I however setup the healthcheck in the task definition, it works fine and health status appears in the console as well.

Which service(s) is this request for?
Fargate

Are you currently working around this issue?

Duplicating healthcheck instruction via AWS CDK / Console does the trick.

Additional context
I use node.js v14, docker, and healthcheck process written in node.

@joebowbeer
Copy link
Contributor

joebowbeer commented Jul 18, 2021

There is a lot of discussion about Dockferfile HEALTHCHECK in AWS container issues.

Note that the HEALTHCHECK was added to Dockerfile for Docker Swarm, relatively recently.

I think the EKS (Kubernetes) approach to this is the most maintainable:

https://stackoverflow.com/q/41475088/901597

Since Kubernetes 1.8, the Docker HEALTHCHECK has been disabled explicitly in Kubernetes.

I find that HEALTHCHECK depends a lot on deployment, so as a rule I do not add HEALTHCHECK to Dockerfile, but instead I add it to docker-compose, ECS taskdef, and EKS Deployment, as needed.

@paya-cz
Copy link
Author

paya-cz commented Jul 19, 2021

Closed, dupe of #1041

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

No branches or pull requests

2 participants