mirror of https://github.com/apache/druid.git
Auto-detect docker-compose (#13754)
This commit is contained in:
parent
9100a61bf6
commit
f28c06515b
|
@ -165,20 +165,31 @@ function docker_file {
|
||||||
# Print environment for debugging
|
# Print environment for debugging
|
||||||
#env
|
#env
|
||||||
|
|
||||||
|
# Determine if docker-compose is available. If not, assume Docker supports
|
||||||
|
# the compose subcommand
|
||||||
|
set +e
|
||||||
|
if which docker-compose > /dev/null
|
||||||
|
then
|
||||||
|
DOCKER_COMPOSE='docker-compose'
|
||||||
|
else
|
||||||
|
DOCKER_COMPOSE='docker compose'
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
|
||||||
case $CMD in
|
case $CMD in
|
||||||
"-h" )
|
"-h" )
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
"help" )
|
"help" )
|
||||||
usage
|
usage
|
||||||
docker-compose help
|
$DOCKER_COMPOSE help
|
||||||
;;
|
;;
|
||||||
"up" )
|
"up" )
|
||||||
category $*
|
category $*
|
||||||
echo "Starting cluster $DRUID_INTEGRATION_TEST_GROUP"
|
echo "Starting cluster $DRUID_INTEGRATION_TEST_GROUP"
|
||||||
build_shared_dir
|
build_shared_dir
|
||||||
cd $CLUSTER_DIR
|
cd $CLUSTER_DIR
|
||||||
docker-compose `docker_file` up -d
|
$DOCKER_COMPOSE `docker_file` up -d
|
||||||
# Enable the following for debugging
|
# Enable the following for debugging
|
||||||
#show_status
|
#show_status
|
||||||
;;
|
;;
|
||||||
|
@ -192,12 +203,11 @@ case $CMD in
|
||||||
# Enable the following for debugging
|
# Enable the following for debugging
|
||||||
#show_status
|
#show_status
|
||||||
cd $CLUSTER_DIR
|
cd $CLUSTER_DIR
|
||||||
echo docker-compose `docker_file` $CMD
|
$DOCKER_COMPOSE `docker_file` $CMD
|
||||||
docker-compose `docker_file` $CMD
|
|
||||||
;;
|
;;
|
||||||
"*" )
|
"*" )
|
||||||
category $*
|
category $*
|
||||||
cd $CLUSTER_DIR
|
cd $CLUSTER_DIR
|
||||||
docker-compose `docker_file` $CMD
|
$DOCKER_COMPOSE `docker_file` $CMD
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue