Simple bash script to wait for a Docker container until the health check returns healthy
or the timeout exceeded.
Usage: wait-for-healthy-container.sh <container name> [timeout]
ie. wait-for-healthy-container.sh my_app_container 120
Script waits till the health check state of a container is 'healthy'.
The docker container must have a healthcheck configured for this script to work.