-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
39 lines (28 loc) · 939 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
frontendImg = frontend:transcendence
nginxImg = nginx:transcendence
up: build
docker compose -f ./docker-compose.yml up
build:
docker compose -f ./docker-compose.yml build
stop:
docker compose -f ./docker-compose.yml stop
start:
docker compose -f ./docker-compose.yml start
down:
docker compose -f ./docker-compose.yml down
downV:
docker compose -f ./docker-compose.yml down -v
imgClean:
@if [ $(shell docker image ls | grep frontend | wc -l) -eq 1 ]; \
then docker rmi $(frontendImg); fi
@if [ $(shell docker image ls | grep nginx | wc -l) -eq 1 ]; \
then docker rmi $(nginxImg); fi
clean: downV imgClean
# Remove all stoped containers, all unused images, all networks not used by at least one container, unused build cache
fclean:
yes | docker container prune
yes | docker image prune
yes | docker network prune
yes | docker system prune
re: down up
.PHONY: up build all stop down downVolume re imgClean clean