Skip to content

Instantly share code, notes, and snippets.

@nam20485
Created February 21, 2021 02:34
Show Gist options
  • Save nam20485/034bd080614020c366b95780227f1a4d to your computer and use it in GitHub Desktop.
Save nam20485/034bd080614020c366b95780227f1a4d to your computer and use it in GitHub Desktop.
HEALTHCHECK command in Dockerfile
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