Don't delete docker images if BK is not running

This commit is contained in:
Martin Lablans
2023-03-08 10:37:37 +01:00
parent 0ff153ef22
commit 380511d3bb
3 changed files with 11 additions and 4 deletions

View File

@ -170,9 +170,10 @@ function retry {
}
function bk_is_running {
detectCompose
RUNNING="$($COMPOSE -p bridgehead-$PROJECT -f ./$PROJECT/docker-compose.yml $OVERRIDE ps -q)"
NUMBEROFRUNNING=$(echo "$RUNNING" | wc -l)
if [ $NUMBEROFRUNNING -gt 0 ]; then
if [ $NUMBEROFRUNNING -ge 2 ]; then
return 0
else
return 1