Adjust start scripts
[aaf/authz.git] / auth / docker / dclean.sh
1 #!/bin/bash
2 # Pull in Variables from d.props
3 . ./d.props
4
5 if [ "$1" == "" ]; then
6     AAF_COMPONENTS="$(cat components) config core agent"
7 else
8     AAF_COMPONENTS="$@"
9 fi
10
11 echo "Y" | docker container prune
12 for AAF_COMPONENT in ${AAF_COMPONENTS}; do
13     docker image rm $ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION}
14     if [ ! "$PREFIX" = "" ]; then
15       docker image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:${VERSION}
16       docker image rm $DOCKER_REPOSITORY/$ORG/$PROJECT/aaf_$AAF_COMPONENT:latest
17     fi
18 done
19 echo "Y" | docker image prune