2323GOBIN =$(shell go env GOBIN)
2424endif
2525
26+ CONTAINER_ENGINE ?= docker
27+
2628all : manager
2729
2830# Run tests
@@ -74,15 +76,15 @@ generate: controller-gen
7476 $(CONTROLLER_GEN ) object:headerFile=" hack/boilerplate.go.txt" paths=" ./..."
7577
7678docker-create :
77- docker buildx create --platform " linux/amd64,linux/arm64" --use
79+ ${CONTAINER_ENGINE} buildx create --platform " linux/amd64,linux/arm64" --use
7880
7981# Build the docker image
8082docker-build :
81- docker buildx build --platform=" linux/arm64,linux/amd64" -t ${IMG} .
83+ ${CONTAINER_ENGINE} buildx build --platform=" linux/arm64,linux/amd64" -t ${IMG} .
8284
8385# Push the docker image
8486docker-push :
85- docker buildx build --push --platform=" linux/arm64,linux/amd64" -t ${IMG} .
87+ ${CONTAINER_ENGINE} buildx build --push --platform=" linux/arm64,linux/amd64" -t ${IMG} .
8688
8789# Download controller-gen locally if necessary
8890CONTROLLER_GEN = $(shell pwd) /bin/controller-gen
@@ -119,7 +121,7 @@ bundle: manifests kustomize
119121# Build the bundle image.
120122.PHONY : bundle-build
121123bundle-build :
122- docker buildx build --platform=" linux/arm64,linux/amd64" -f bundle.Dockerfile -t $(BUNDLE_IMG ) .
124+ ${CONTAINER_ENGINE} buildx build --platform=" linux/arm64,linux/amd64" -f bundle.Dockerfile -t $(BUNDLE_IMG ) .
123125
124126# Generate bundle manifests and metadata, then validate generated files.
125127.PHONY : codegen
@@ -164,7 +166,7 @@ install-kuttl:
164166
165167.PHONY : e2e-kind-setup
166168e2e-kind-setup :
167- docker build -t redis-operator:e2e -f Dockerfile .
169+ ${CONTAINER_ENGINE} build -t redis-operator:e2e -f Dockerfile .
168170 kind create cluster --config tests/_config/kind-config.yaml
169171 kind load docker-image redis-operator:e2e --name kind
170- make deploy IMG=redis-operator:e2e
172+ make deploy IMG=redis-operator:e2e
0 commit comments