Support using `docker compose` (docker compose v2) instead of
`docker-compose` (v1)
- Introduce `COMPOSE_V2` and `COMPOSE_COMMAND` variables
- Keep the default version at v1 (`COMPOSE_V2=0`)
- Refactor error message to expose that possibility
Signed-off-by: Nicolas signed-log FORMICHELLA <stigpro@outlook.fr>
echo"Sorry, this make target requires docker-compose to be installed.";\
false;\
@if ["$(COMPOSE_V2)"="0"];then\
if ! command -v "docker-compose" >/dev/null 2>&1;then\
echo"Sorry, this make target requires docker-compose to be installed. To use compose v2, re-run with COMPOSE_V2=1";\
false;\
fi\
else\
if ! $(COMPOSE_COMMAND) >/dev/null 2>&1;then\
echo"Sorry, this make target has been configured to support docker compose v2 but the compose subcommand isn't present in docker. To use docker-compose v1, remove the COMPOSE_V2 switch";\