Last active
February 1, 2020 18:36
-
-
Save thomasleveil/7e684c3cb7b25fee68d37afa5fc27a8f to your computer and use it in GitHub Desktop.
docker healthchecks cheatsheet
This file contains 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: | |
test: ["CMD", "wget", "--retry-connrefused", "--tries=10", "--spider", "--server-response", "http://localhost"] | |
# wget --retry-connrefused --tries=10 --spider --server-response http://localhost:8080/ | |
healthcheck: | |
test: ["CMD", "curl", "--silent", "--show-error", "--fail", "--retry", "10", "--retry-connrefused", "--retry-delay", "5", "--retry-max-time", "30", "--head", "http://localhost:3000/login"] | |
# curl --silent --show-error --fail --retry 10 --retry-connrefused --retry-delay 5 --retry-max-time 30 --head http://localhost:3000/login | |
healthcheck: | |
test: ["CMD", "nc", "-zv", "localhost", "9091"] | |
# nc -zv localhost 9091 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment