-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (53 loc) · 1.18 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
65
66
67
68
69
70
71
docker_name=strack_git_hook
docker_tag=test/$(docker_name)
# restart -> always , no
docker_restart_policy=always
net_type=mcv
net_ip=192.168.31.210
port=80
supervisord=9000
#bin
chrome_bin="C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
# echo helps
help:
@echo 'Here is the command list:'
@echo '------------------------'
@cat Makefile |grep '^\w.*:$$'
ssh:
@ssh root@$(net_ip)
view:
@start '' $(chrome_bin) $(net_ip):$(port)/login
view_supervisord:
@start '' $(chrome_bin) $(net_ip):$(supervisord)
build:
@docker build . -t $(docker_tag)
create_no_bridge:
@docker run -d --restart=${docker_restart_policy} --name $(docker_name) \
$(docker_tag)
create:
@docker run -d --restart=${docker_restart_policy} --name $(docker_name) \
--net=$(net_type) --ip=$(net_ip) \
$(docker_tag)
connect_bridge:
@docker network connect bridge ${docker_name}
stop:
@docker stop $(docker_name)
start:
@docker start $(docker_name)
restart:
@docker restart $(docker_name)
enter:
@docker exec -it $(docker_name) /bin/bash
up:
@make build
@make create
force-up:
@make down
@make up
down:
@make stop
@make rm
rm:
@docker rm $(docker_name)
log:
@docker logs $(docker_name)