From b59ccd5c8357c6e008eb4bca40e967cd46982366 Mon Sep 17 00:00:00 2001 From: "Pinto Spindler, Stephan" <25225092+s-spindler@users.noreply.github.com> Date: Mon, 21 Aug 2023 23:19:40 +0200 Subject: [PATCH 1/2] Add check for docker compose Signed-off-by: Pinto Spindler, Stephan <25225092+s-spindler@users.noreply.github.com> --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index a5d9805fae..234e236ddb 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,7 @@ container: check-docker-tool-check check-docker-buildx-tool-check check-goreleas # To run the service, run `make container` and then `make service` # making the container is a longer process and thus not a dependency of service. .PHONY: start-service -start-service: +start-service: check-docker-compose-tool-check # requires force recreate since docker compose reuses containers and neo4j does # not handle that well. # @@ -151,6 +151,14 @@ check-docker-buildx-tool-check: exit 1; \ fi +# Check that docker compose is installed. +.PHONY: check-docker-compose-tool-check +check-docker-compose-tool-check: + @if ! docker compose >/dev/null 2>&1; then \ + echo "'$(CONTAINER)' compose is not installed or not correctly linked to. Please install '$(CONTAINER)' compose or link it as a plugin and try again."; \ + exit 1; \ + fi + # Check that protoc is installed. .PHONY: check-protoc-tool-check check-protoc-tool-check: @@ -184,4 +192,4 @@ check-goreleaser-tool-check: # Check that all the tools are installed. .PHONY: check-tools -check-tools: check-docker-tool-check check-docker-buildx-tool-check check-protoc-tool-check check-golangci-lint-tool-check check-mockgen-tool-check check-goreleaser-tool-check +check-tools: check-docker-tool-check check-docker-buildx-tool-check check-docker-compose-tool-check check-protoc-tool-check check-golangci-lint-tool-check check-mockgen-tool-check check-goreleaser-tool-check From 26434a50fc8ca862017c6c82b2644658f3c91ee9 Mon Sep 17 00:00:00 2001 From: "Pinto Spindler, Stephan" <25225092+s-spindler@users.noreply.github.com> Date: Tue, 22 Aug 2023 09:29:45 +0200 Subject: [PATCH 2/2] Reference docker by variable Signed-off-by: Pinto Spindler, Stephan <25225092+s-spindler@users.noreply.github.com> --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 234e236ddb..64ab801d2d 100644 --- a/Makefile +++ b/Makefile @@ -146,7 +146,7 @@ check-docker-tool-check: # Check that docker buildx is installed. .PHONY: check-docker-buildx-tool-check check-docker-buildx-tool-check: - @if ! docker buildx >/dev/null 2>&1; then \ + @if ! $(CONTAINER) buildx >/dev/null 2>&1; then \ echo "'$(CONTAINER)' buildx is not installed. Please install '$(CONTAINER)' buildx and try again."; \ exit 1; \ fi @@ -154,7 +154,7 @@ check-docker-buildx-tool-check: # Check that docker compose is installed. .PHONY: check-docker-compose-tool-check check-docker-compose-tool-check: - @if ! docker compose >/dev/null 2>&1; then \ + @if ! $(CONTAINER) compose >/dev/null 2>&1; then \ echo "'$(CONTAINER)' compose is not installed or not correctly linked to. Please install '$(CONTAINER)' compose or link it as a plugin and try again."; \ exit 1; \ fi