-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
32 lines (26 loc) · 980 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
all: build
build:
mkdir -p /home/vjean/data
mkdir -p /home/vjean/data/mariadb
mkdir -p /home/vjean/data/wordpress
docker-compose -f ./srcs/docker-compose.yml up -d --build
execnginx:
docker exec -it nginx /bin/bash
execmariadb:
docker exec -it mariadb /bin/bash
execwp:
docker exec -it wordpress /bin/bash
# docker system prune -af: remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes.
# docker rmi -f $(docker images -a -q): remove all images -> just in case system prune -af doesn't remove all images
down:
docker-compose -f ./srcs/docker-compose.yml down
docker-compose -v ./srcs/docker-compose.yml down
docker system prune -af --volumes
docker network prune -f
docker volume prune -f
docker rmi -f $(docker images -a -q) || echo "No images to remove"
docker volume rm srcs_mariadb -f
docker volume rm srcs_wordpress -f
rm -rf /home/vjean/data/mariadb
rm -rf /home/vjean/data/wordpress
re: down build