-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclean.sh
More file actions
executable file
·35 lines (31 loc) · 1.14 KB
/
Copy pathclean.sh
File metadata and controls
executable file
·35 lines (31 loc) · 1.14 KB
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
#!/bin/bash
# Ghost Machines: Environment Pruning Utility
# Standardizes the shutdown and cleanup of ghost environments.
echo "------------------------------------------------"
echo " GHOST MACHINES: CLEANUP"
echo "------------------------------------------------"
echo "1) Standard Stop - Stop and remove containers/network"
echo "2) Deep Clean - Stop and remove containers, networks, AND volumes"
echo "3) Reset Template - All of the above, plus remove the base image"
echo "4) Cancel"
echo "------------------------------------------------"
read -p "Select cleanup level [1-4]: " CHOICE
case $CHOICE in
1)
echo "[INFO] Performing standard stop..."
docker compose --profile dual --profile remote down
;;
2)
echo "[INFO] Performing deep clean (removing volumes)..."
docker compose --profile dual --profile remote down -v
;;
3)
echo "[INFO] Performing full reset (removing volumes and image)..."
docker compose --profile dual --profile remote down -v --rmi local
;;
*)
echo "Cleanup cancelled."
exit 0
;;
esac
echo "[SUCCESS] Cleanup complete."