From ba0b717a0aeae4df42276149c78226fa4d3e1b8f Mon Sep 17 00:00:00 2001 From: Ernesto Puerta Date: Thu, 25 Jan 2024 17:21:07 +0100 Subject: [PATCH] docker-compose: support v1 and v2 Fixes: #393 The main difference between docker compose v1 and v2 is that v1 commnad is `docker-compose`, while v2 is usually a split subcommand `docker compose`. Signed-off-by: Ernesto Puerta --- mk/containerized.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mk/containerized.mk b/mk/containerized.mk index 5669423d2..652f73480 100644 --- a/mk/containerized.mk +++ b/mk/containerized.mk @@ -2,7 +2,8 @@ # Docker and docker-compose specific commands DOCKER = docker -DOCKER_COMPOSE = docker-compose ## Docker-compose command +# Docker-compose v1 or v2 +DOCKER_COMPOSE != command -v docker-compose || command -v docker | tr -d '\n' | cat - <(echo " compose") DOCKER_COMPOSE_COMMANDS = pull build up run exec ps top images logs port \ pause unpause stop restart down events