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 <[email protected]>
  • Loading branch information
cmickeyb committed Sep 16, 2024
1 parent 75a758d commit e2891e1
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 e2891e1

Please sign in to comment.