Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- function is_container_healthy {
- INSTANCE_ID=$(docker ps --filter "name=$1" --format "{{.ID}}")
- IS_HEALTHY=$(docker inspect -f '{{if eq "healthy" .State.Health.Status}}0{{else}}1{{end}}' "${INSTANCE_ID}")
- return "${IS_HEALTHY}"
- }
Add Comment
Please, Sign In to add comment