-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
64 lines (43 loc) · 1.33 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dockerfile = Dockerfile
docker_username = leoheck
docker_repo = kiri
docker_tagname = latest
docker_build: $(dockerfile)
time docker build \
-f $(dockerfile) \
--tag $(docker_username)/$(docker_repo):$(docker_tagname) .
docker images
docker_build_no_cache: $(dockerfile)
time docker build \
-f $(dockerfile) \
--no-cache \
--tag $(docker_username)/$(docker_repo):$(docker_tagname) .
docker images
docker_setup:
# -sudo groupadd docker
sudo usermod -aG docker $(USER)
docker_login:
docker login --username $(docker_username)
docker_push: docker_build
docker push $(docker_username)/$(docker_repo):$(docker_tagname)
# get the latest kiri image from docker hub
docker_pull:
docker pull $(docker_username)/$(docker_repo):$(docker_tagname)
show_containers:
docker ps -a
stop_all_docker_containers:
docker ps -q || docker kill $(shell docker ps -q)
remove_all_docker_containers:
docker ps -a -q || docker rm $(shell docker ps -a -q)
remove_all_docker_images:
docker images -q || docker rmi $(shell docker images -q | tac)
system_prune:
make stop_all_docker_containers
make remove_all_docker_containers
make remove_all_docker_images
yes | docker system prune
.PHONY: run_test
testcase_path = "/home/lheck/Documents/assoc-board"
# Don't use this target, this is just my own test case
run_test:
./kiri $(testcase_path)