Skip to content

Commit

Permalink
check for docker compose command in Makefiles
Browse files Browse the repository at this point in the history
Signed-off-by: Mic Bowman <mic.bowman@intel.com>
  • Loading branch information
cmickeyb authored and prakashngit committed Sep 16, 2024
1 parent 8d9b8ca commit 1b8279c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docker/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,15 @@ PDO_USER_UID ?= $(shell id -u)
PDO_GROUP_UID ?= $(shell id -g)

DOCKER_COMMAND ?= docker
DOCKER_COMPOSE_COMMAND ?= docker-compose

ifndef DOCKER_COMPOSE_COMMAND
DOCKER_COMPOSE_COMMAND := $(shell command -v docker-compose 2> /dev/null)
ifndef DOCKER_COMPOSE_COMMAND
$(warning "docker-compose command is not available")
DOCKER_COMPOSE_COMMAND := $(DOCKER_COMMAND) compose
endif
endif

# to work with upstream docker and docker compose plugin, redefine above
# as `DOCKER_COMPOSE_COMMAND=docker compose` in your `make.loc`

Expand Down

0 comments on commit 1b8279c

Please sign in to comment.