-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
38 lines (27 loc) · 862 Bytes
/
Makefile
File metadata and controls
38 lines (27 loc) · 862 Bytes
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
DOCK_COMPOSE_CMD := docker-compose
DOCK_COMPOSE_FILE := srcs/docker-compose.yml
all: build updetach
build up down kill:
$(DOCK_COMPOSE_CMD) -f $(DOCK_COMPOSE_FILE) $@
buildclean:
$(DOCK_COMPOSE_CMD) -f $(DOCK_COMPOSE_FILE) build --no-cache
updetach:
$(DOCK_COMPOSE_CMD) -f $(DOCK_COMPOSE_FILE) up -d
show:
@echo "\n Images:"
@docker images
@echo "\n Containers: "
@docker ps
@echo "\n Volumes: "
@docker volume ls
@echo "\n Networks: "
@docker network ls --filter type=custom
run: down build updetach
re: down buildclean updetach
rmi:
docker rmi $(shell docker images -aq) -f | true
clean:
$(DOCK_COMPOSE_CMD) -f $(DOCK_COMPOSE_FILE) down --rmi local --remove-orphans
fclean: rmi
$(DOCK_COMPOSE_CMD) -f $(DOCK_COMPOSE_FILE) down --rmi all -v --remove-orphans
.PHONY: all build up down kill updateach buildclean show run re clean fclean