Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, it looks working :)
Minor comment:
wget
can be called with the--spider
parameter not to download the content, just check the HTTP code.Also the
|| exit 1
is redundant, since it is the defaultwget
functionality.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not redundant; wget doesn't always exit with exit code 1 which is the expected code for unhealthy containers, not just non-zero. While it works, the Dockerfile reference explicitly expects an exit code 1, reserves the exit code 2, and makes no mention of other exit codes making them effectively undefined behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@StaNov Can you please finalize this so we can merge it? 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to create a new PR because I cannot work on this branch.
@vexdev FYI, if you were able to finish it in a matter of hours, I'd leave it to you.
@cyyynthia, thanks for the explanation, I didn't know this healthcheck contract.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I created a new PR #2694. I credited @vexdev in the description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries I'm not after credits only helpful contributions when I can :)