Skip to content

Commit

Permalink
docker-compose: support v1 and v2
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
epuertat committed Jan 25, 2024
1 parent ac5a7ad commit ba0b717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mk/containerized.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ba0b717

Please sign in to comment.