Created
June 25, 2021 09:16
-
-
Save mikker/29595729729f0280cad33e098e3e2eab to your computer and use it in GitHub Desktop.
Wait for Docker.app to be ready
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
#!/bin/bash | |
# Usage: | |
# $ ensure_docker_is_ready && docker-compose up | |
docker ps &> /dev/null | |
if [ $? -ne 0 ]; then | |
open -a Docker.app | |
else | |
exit 0 | |
fi | |
echo -n "Waiting for Docker to be ready..." | |
sleep 5 | |
until docker ps &> /dev/null; do | |
echo -n "." | |
sleep 5 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment