-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
54 lines (41 loc) · 795 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
42
43
44
45
46
47
48
49
50
51
52
53
54
ifeq ($(OS), Windows_NT)
DOCKER_CONTAINER_LIST = $(shell docker ps -aq)
else
DOCKER_CONTAINER_LIST = $(shell docker ps -aq)
endif
.PHONY: dsp
dsp:
@-docker system prune -af
.PHONY: dvp
dvp:
@-docker volume prune -f
.PHONY: dnp
dnp:
@-docker network prune -f
.PHONY: ds
ds:
$(if $(strip $(DOCKER_CONTAINER_LIST)), docker stop $(DOCKER_CONTAINER_LIST))
.PHONY: dv
dv:
$(if $(strip $(DOCKER_CONTAINER_LIST)), docker rm $(DOCKER_CONTAINER_LIST))
.PHONY: clean
clean: ds dv dvp dnp
.PHONY: remove
remove: ds dv dvp dnp dsp
.PHONY: dcbn
dcbn:
docker-compose build --no-cache
.PHONY: dcub
dcub:
docker-compose up --build
.PHONY: dcubd
dcubd:
docker-compose up --build -d
.PHONY: dcs
dcs:
docker-compose down
.PHONY: dcps
dcps:
docker-compose ps
.PHONY: run
run: dcps dcs dcubd