-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (26 loc) · 759 Bytes
/
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
NAMESPACE = diamond5170
IMAGENAME = monitorrent
PORT = 6687
.PHONY: download build run stop start rmf rmi
build:
docker rmi -f $(NAMESPACE)/$(IMAGENAME):bak || true
docker tag $(NAMESPACE)/$(IMAGENAME) $(NAMESPACE)/$(IMAGENAME):bak || true
docker rmi -f $(NAMESPACE)/$(IMAGENAME) || true
docker build -t $(NAMESPACE)/$(IMAGENAME) .
run:
docker rm $(IMAGENAME) || true
docker run -d -p $(PORT):$(PORT) $(NAMESPACE)/$(IMAGENAME)
stop:
docker stop $(IMAGENAME)
start:
docker start $(IMAGENAME)
rmf:
docker rm -f $(IMAGENAME)
rmi:
docker rmi $(NAMESPACE)/$(IMAGENAME)
rmibak:
docker rmi $(NAMESPACE)/$(IMAGENAME):bak
tag:
docker tag $(NAMESPACE)/$(IMAGENAME) $(NAMESPACE)/$(IMAGENAME):latest
push:
docker push $(NAMESPACE)/$(IMAGENAME)