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 || exit 1 to HEALTHCHECK to map cURL exit codes and Docker possible values #167

Merged

Conversation

JoshuaLicense
Copy link
Contributor

Description:
This PR maps any returned cURL exit codes to possible values for the Docker HEALTHCHECK instruction.

Docker HEALTHCHECK instruction possible values:

The command's exit status indicates the health status of the container. The possible values are:

0: success - the container is healthy and ready for use
1: unhealthy - the container isn't working correctly
2: reserved - don't use this exit code

Source: https://docs.docker.com/engine/reference/builder/#healthcheck

cURL exit codes: https://everything.curl.dev/cmdline/exitcode

@TrafeX TrafeX merged commit 1784a0a into TrafeX:master Feb 10, 2024
1 check passed
@TrafeX
Copy link
Owner

TrafeX commented Feb 10, 2024

Hi @JoshuaLicense ,

Good catch! The current way does work (I've had unhealthy containers), but it's not correct.
Merged! 🎉

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

Successfully merging this pull request may close these issues.

2 participants