Skip to content

Commit

Permalink
add checks for docker and docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
iDmple committed Dec 21, 2023
1 parent 1bd6cf7 commit 9ada58d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docker/unchained.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@ usage() {
echo " To view logs of a node: $0 local logs -f"
}

if ! command -v docker &> /dev/null
then
echo "Error: docker could not be found on your system!"
exit 1
fi

if ! docker compose version &> /dev/null
then
echo "Error: docker compose could not be found on your system!"
exit 1
fi

if [ ! $1 == 'local' ] && [ ! $1 == 'atlas' ] && [ ! $1 == 'lite' ] || [ -z $2 ]; then
usage
exit 1
Expand Down

0 comments on commit 9ada58d

Please sign in to comment.