Makefile 922 B

123456789101112131415161718
  1. image_host ?=
  2. image_tag ?= 1.0.0
  3. .PHONY: help build_image push_image build_image_and_push
  4. help: ## Display this help message.
  5. @echo "Please use \`make <target>\` where <target> is one of"
  6. @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; \
  7. {printf "\033[36m%-40s\033[0m %s\n", $$1, $$2}'
  8. build_image: ## Build docker image. Use `image_host` to override the default image host and `image_tag` to do the same for image tag.
  9. docker build -t $(image_host)dynamic-synonym-elasticsearch:$(image_tag) -t $(image_host)dynamic-synonym-elasticsearch:latest .
  10. push_image: ## Push docker image. Use `image_host` to override the default image host.
  11. docker push -a $(image_host)dynamic-synonym-elasticsearch
  12. build_image_and_push: build_image push_image ## Build and push docker image. Use `image_host` to override the default image host and `image_tag` to do the same for image tag.