-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (21 loc) · 746 Bytes
/
Makefile
File metadata and controls
30 lines (21 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# HELP
.PHONY: help
cnf?=.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
# alias
b: build
p: push
c: clean
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help
build: ## Build images, alias: b
@docker build -f Dockerfile . -t $(GROUP_NAME)/$(IMAGE_NAME):latest
@docker tag $(GROUP_NAME)/$(IMAGE_NAME):latest $(GROUP_NAME)/$(IMAGE_NAME):$(VERSION)
push: ## Push images, alias: p
@docker push $(GROUP_NAME)/$(IMAGE_NAME):latest
@docker push $(GROUP_NAME)/$(IMAGE_NAME):$(VERSION)
clean: ## Delete local images, alias: c
@docker rmi $(GROUP_NAME)/$(IMAGE_NAME):latest
@docker rmi $(GROUP_NAME)/$(IMAGE_NAME):$(VERSION)