Created
December 28, 2021 19:13
-
-
Save daveshah/ae776bc6e73796178fba886e41dbd8d5 to your computer and use it in GitHub Desktop.
Quick snippet that halts script execution if docker is not up and running.
This file contains hidden or 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
#!/usr/bin/env bash | |
if ! docker info > /dev/null 2>&1; then | |
echo "This script uses docker, and it isn't running - please start docker and try again!" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment