-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (30 loc) · 1.25 KB
/
Makefile
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
31
32
33
34
35
36
37
38
39
40
41
42
### PLEASE ADJUST THIS TO MATCH YOUR DEFINED APP NAME
DOCKER_IMAGE_NAME=mi4-people-care-4-rare-five1
### All these Values should be correctly preconfigured
REGISTRY=featurecloud.ai
DOCKER_IMAGE_VERSION=latest
DOCKER_IMAGE_TAGNAME=$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_VERSION)
default: build ## default = build
build: ## build the image
docker build -t $(DOCKER_IMAGE_TAGNAME) .
docker tag $(DOCKER_IMAGE_TAGNAME) $(REGISTRY)/$(DOCKER_IMAGE_TAGNAME)
push: ## push image to docker registry
docker push $(REGISTRY)/$(DOCKER_IMAGE_NAME):latest
test: ## test the image
docker run --rm $(DOCKER_IMAGE_TAGNAME) /bin/echo "Success."
rmi: ## remove the image
docker rmi -f $(DOCKER_IMAGE_TAGNAME)
rebuild: rmi build ## rebuild it
run: ## run the image
docker run $(DOCKER_IMAGE_NAME):latest
help: ## This help dialog
@IFS=$$'\n' ; \
help_lines=(`fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//'`); \
for help_line in $${help_lines[@]}; do \
IFS=$$'#' ; \
help_split=($$help_line) ; \
help_command=`echo $${help_split[0]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
help_info=`echo $${help_split[2]} | sed -e 's/^ *//' -e 's/ *$$//'` ; \
printf "%-10s %s\n" $$help_command $$help_info ; \
done
.PHONY: help run list build test push rmi rebuild