diff --git a/Makefile b/Makefile index 21bd829b..d2778f15 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ # - use environment variables to overwrite this value (e.g export VERSION=0.0.2) VERSION ?= $(shell git describe --tags) +CONTAINER_CMD ?= docker + # CHANNELS define the bundle channels used in the bundle. # Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable") # To re-generate a bundle for other specific channels without changing the standard setup, you can: @@ -63,10 +65,10 @@ run: ansible-operator ## Run against the configured Kubernetes cluster in ~/.kub ANSIBLE_ROLES_PATH="$(ANSIBLE_ROLES_PATH):$(shell pwd)/roles" $(ANSIBLE_OPERATOR) run docker-build: ## Build docker image with the manager. - docker build $(BUILD_ARGS) -t ${IMG} . + ${CONTAINER_CMD} build $(BUILD_ARGS) -t ${IMG} . docker-push: ## Push docker image with the manager. - docker push ${IMG} + ${CONTAINER_CMD} push ${IMG} ##@ Deployment @@ -132,7 +134,7 @@ bundle: kustomize ## Generate bundle manifests and metadata, then validate gener .PHONY: bundle-build bundle-build: ## Build the bundle image. - docker build -f bundle.Dockerfile -t $(BUNDLE_IMG) . + ${CONTAINER_CMD} build -f bundle.Dockerfile -t $(BUNDLE_IMG) . .PHONY: bundle-push bundle-push: ## Push the bundle image. @@ -171,7 +173,7 @@ endif # https://github.com/operator-framework/community-operators/blob/7f1438c/docs/packaging-operator.md#updating-your-existing-operator .PHONY: catalog-build catalog-build: opm ## Build a catalog image. - $(OPM) index add --container-tool docker --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) + $(OPM) index add --container-tool ${CONTAINER_CMD} --mode semver --tag $(CATALOG_IMG) --bundles $(BUNDLE_IMGS) $(FROM_INDEX_OPT) # Push the catalog image. .PHONY: catalog-push