Blame view

delete.sh 463 Bytes
a7065b1b3   George Vlahavas   Add deploy and de...
1
2
3
  #!/bin/bash
  # Stop containers and removes containers, networks, volumes, and images 
  docker-compose -f docker-compose-jfrog.yml down
a712ee3c4   George Vlahavas   Remove volumes on...
4
5
6
7
8
  docker volume ls | \
  	grep kea_ | \
  	tr -s ' ' | \
  	cut -d' ' -f2 | \
  	xargs docker volume rm
a7065b1b3   George Vlahavas   Add deploy and de...
9
10
11
12
13
  
  # Wait a bit 
  sleep 5s
  
  # Check that containers were removed succesfully
707712013   George Vlahavas   Only show KEA con...
14
  res=`docker ps -a | grep "/curex-local/kea_" | wc -l`
345847925   George Vlahavas   Only show message...
15
  if [ $res -ne 0 ]; then
707712013   George Vlahavas   Only show KEA con...
16
17
18
19
  	echo "ERROR: Some KEA containers have not been removed."
  	docker ps -a
  	exit 1
  fi
a7065b1b3   George Vlahavas   Add deploy and de...
20