Skip to content

Commit

Permalink
Added test to check if docker is actually running with sane error mes…
Browse files Browse the repository at this point in the history
…sage
  • Loading branch information
aultac committed Jun 15, 2021
1 parent 855af65 commit f859c30
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions oadadeploy
Original file line number Diff line number Diff line change
Expand Up @@ -1126,9 +1126,14 @@ require() {
}
require ls sed curl docker docker-compose

# Verify docker is actually running, otherwise nothing is going to work
docker version > /dev/null 2>&1
[ "$?" -ne 0 ] && echo -e "ERROR: docker does not appear to be running, please start it first" && exit 1

# usage exits this script when done
[ "$#" -lt 1 ] && usage


CMD=$1
shift
case $CMD in
Expand Down
5 changes: 5 additions & 0 deletions src/oadadeploy
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,14 @@ require() {
}
require ls sed curl docker docker-compose

# Verify docker is actually running, otherwise nothing is going to work
docker version > /dev/null 2>&1
[ "$?" -ne 0 ] && echo -e "ERROR: docker does not appear to be running, please start it first" && exit 1

# usage exits this script when done
[ "$#" -lt 1 ] && usage


CMD=$1
shift
case $CMD in
Expand Down

0 comments on commit f859c30

Please sign in to comment.