forked from chickling/kmanager
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (35 loc) · 1.03 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
.SILENT:
version = 0.0.1
name = "chickling/kmanager"
container_name = "chickling-kmanager"
cid=$(shell docker ps -aqf name=$(container_name))
help:
echo "Commands: (kmanager version: $(version))"
echo " clean - remove java target folder"
echo " package - build maven package"
echo " run-java - run service with native java"
echo " run - run service with docker"
echo " build - build docker image"
echo " push - push docker image to docker hub"
echo " version - show version"
clean:
rm -rf target
package: clean
mvn package -X
run-java: package
java -jar target/ChicklingKmanager.jar
run: remove_container
docker run -it -p 8099:8099 --name $(container_name) $(name):$(version)
build: package
cp target/ChicklingKmanager.jar docker/ && docker build -t $(name):$(version) ./docker && rm -f docker/ChicklingKmanager.jar
push: build
docker push $(name):$(version)
test:
echo "Tests not yet implemented"
remove_container:
ifneq ($(cid), )
echo "removing $(container_name)"
docker rm $(container_name)
endif
version:
echo $(version)