Created
February 21, 2021 02:34
-
-
Save nam20485/034bd080614020c366b95780227f1a4d to your computer and use it in GitHub Desktop.
HEALTHCHECK command in Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HEALTHCHECK CMD powershell -command ` | |
try { ` | |
$response = iwr http://localhost:80 -UseBasicParsing; ` | |
if ($response.StatusCode -eq 200) { return 0} ` | |
else {return 1}; ` | |
} catch { return 1 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment