diff --git a/make/common.sh b/make/common.sh index 48918e4de..84531cbb9 100644 --- a/make/common.sh +++ b/make/common.sh @@ -103,14 +103,19 @@ function check_docker { } function check_dockercompose { - if ! docker-compose --version &> /dev/null + if [! docker compose version] &> /dev/null || [! docker-compose --version] &> /dev/null then - error "Need to install docker-compose(1.18.0+) by yourself first and run this script again." + error "Need to install docker-compose(1.18.0+) or a docker-compose-plugin (https://docs.docker.com/compose/)by yourself first and run this script again." exit 1 fi - # docker-compose has been installed, check its version - if [[ $(docker-compose --version) =~ (([0-9]+)\.([0-9]+)([\.0-9]*)) ]] + # either docker compose plugin has been installed + if docker compose version &> /dev/null + then + note "$(docker compose version)" + + # or docker-compose has been installed, check its version + elif [[ $(docker-compose --version) =~ (([0-9]+)\.([0-9]+)([\.0-9]*)) ]] then docker_compose_version=${BASH_REMATCH[1]} docker_compose_version_part1=${BASH_REMATCH[2]}