mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-12 13:35:00 +01:00
support docker compose v2 (#16919)
Signed-off-by: yminer <yminer@vmmware.com> Co-authored-by: yminer <yminer@vmmware.com>
This commit is contained in:
parent
93f3bb16d6
commit
1db7d6375a
@ -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]}
|
||||
|
Loading…
Reference in New Issue
Block a user