Skip to content

Instantly share code, notes, and snippets.

@jhuiting
Created October 10, 2016 13:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhuiting/a9f9acae15083d8b8ccf49ff5186c466 to your computer and use it in GitHub Desktop.
Save jhuiting/a9f9acae15083d8b8ccf49ff5186c466 to your computer and use it in GitHub Desktop.
Docker healthcheck bash
echo "Waiting for the API to be started";
until [ "`docker inspect -f {{.State.Health.Status}} $(docker-compose ps -q api)`" = "healthy" ]; do
sleep 0.5;
echo -n "."
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment