Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop use of legacy compose binary #1252

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,20 @@ ifneq ($(BUILD_TAG),)
COMPOSE_PROJECT_NAME := $(BUILD_TAG)
endif

DOCKERCOMPOSE := ./bin/docker-compose

# install docker-compose as a run script
# we require a specific release version that correctly supports device_cgroup_rules for the qemu worker
# see https://github.com/docker/compose/issues/9059
$(DOCKERCOMPOSE):
mkdir -p $(shell dirname "$@")
ifeq ($(shell uname -m),arm64)
curl -fsSL "https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-$(shell uname -s | tr '[:upper:]' '[:lower:]')-aarch64" -o $@
else
curl -fsSL "https://github.com/docker/compose/releases/download/v2.3.3/docker-compose-$(shell uname -s | tr '[:upper:]' '[:lower:]')-$(shell uname -m)" -o $@
endif
chmod +x $@

.NOTPARALLEL: $(DOCKERCOMPOSE)

help: ## Print help message
@echo -e "$$(grep -hE '^\S+:.*##' $(MAKEFILE_LIST) | sed -e 's/:.*##\s*/:/' -e 's/^\(.\+\):\(.*\)/\\x1b[36m\1\\x1b[m:\2/' | column -c2 -t -s :)"

printenv:
@printenv

config: $(DOCKERCOMPOSE) ## Print flattened docker-compose definition
$(DOCKERCOMPOSE) config
config: ## Print flattened docker-compose definition
docker compose config

build: $(DOCKERCOMPOSE) ## Build the required images
$(DOCKERCOMPOSE) build $(BUILDARGS)
build: ## Build the required images
docker compose build $(BUILDARGS)

test: $(DOCKERCOMPOSE) build ## Run the test suites
$(DOCKERCOMPOSE) up $(UPARGS) --exit-code-from client
test: build ## Run the test suites
docker compose up $(UPARGS) --exit-code-from client

local-test: ## Alias for 'make test WORKER_TYPE=qemu'
$(MAKE) test WORKER_TYPE=qemu
Expand All @@ -89,8 +73,8 @@ qemu: ## Alias for 'make test WORKER_TYPE=qemu'
testbot:## Alias for 'make test WORKER_TYPE=testbot'
$(MAKE) test WORKER_TYPE=testbot

stop: $(DOCKERCOMPOSE) ## Stop and remove any existing containers and volumes
-$(DOCKERCOMPOSE) down --remove-orphans --rmi all --volumes
stop: ## Stop and remove any existing containers and volumes
-docker compose down --remove-orphans --rmi all --volumes

down: stop ## Alias for 'make stop'

Expand Down
Loading