File size: 356 Bytes
0fe4404
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash
echo "Warning: This will remove all containers and volumes, including persistent data. Do you want to continue? [Y/N]"
read ans
if [ "$ans" == "Y" ] || [ "$ans" == "y" ]; then
  command docker-compose 2>/dev/null
  if [ "$?" == "0" ]; then
    docker-compose down -v
  else
    docker compose down -v
  fi
else
  echo "Operation cancelled."
fi