From eaa7ee1c0dc2505935e05d6d83ac5ef639620d79 Mon Sep 17 00:00:00 2001 From: uniform64 Date: Sat, 25 Nov 2023 20:19:01 +0800 Subject: [PATCH] add support for docker compose v2 (fix #730) Signed-off-by: uniform64 --- test-network/network.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test-network/network.sh b/test-network/network.sh index e673855336..44608b7df4 100755 --- a/test-network/network.sh +++ b/test-network/network.sh @@ -29,7 +29,11 @@ trap "popd > /dev/null" EXIT . scripts/utils.sh : ${CONTAINER_CLI:="docker"} -: ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +if command -v docker-compose > /dev/null 2>&1; then + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI}-compose"} +else + : ${CONTAINER_CLI_COMPOSE:="${CONTAINER_CLI} compose"} +fi infoln "Using ${CONTAINER_CLI} and ${CONTAINER_CLI_COMPOSE}" # Obtain CONTAINER_IDS and remove them