-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (40 loc) · 1.36 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
#####
## Build images (and ensure they are up to date)
build:
@echo 'Pull & build required images'
docker-compose build
#####
## Start containers
start:
@echo 'Starting containers'
docker-compose up -d
#####
## Stop containers & remove docker networks
stop:
@echo 'Stoping containers'
docker-compose down
#####
## Open container
exec:
@echo 'Open container'
ifeq ($(dc),ubuntu)
docker exec -it -w /var/www/html dc.$(dc) /bin/bash
else
docker exec -it dc.$(dc) /bin/bash
endif
#####
## Display available make tasks
help:
@echo 'Recipes List:'
@echo ''
@echo 'make <recipes>'
@echo ''
@echo '+-----------------+--------------------------------------------------------------------+'
@echo '| Recipes | Utility |'
@echo '+-----------------+--------------------------------------------------------------------+'
@echo '| start | Start containers (Also builds & pull images, if there not exists) |'
@echo '| stop | Stop containers & remove docker networks |'
@echo '| build | Re/Build containers |'
@echo '| exec dc=NAME | Open container |'
@echo '+-----------------+--------------------------------------------------------------------+'
@echo ''