Guest User

Untitled

a guest
Oct 15th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. function is_container_healthy {
  4. INSTANCE_ID=$(docker ps --filter "name=$1" --format "{{.ID}}")
  5. IS_HEALTHY=$(docker inspect -f '{{if eq "healthy" .State.Health.Status}}0{{else}}1{{end}}' "${INSTANCE_ID}")
  6. return "${IS_HEALTHY}"
  7. }
Add Comment
Please, Sign In to add comment