List volumes/secrets when removing
This commit is contained in:
parent
621c8cd5c4
commit
040374e781
33
abra
33
abra
@ -1130,24 +1130,31 @@ sub_app_delete (){
|
||||
|
||||
rm "$ENV_FILE"
|
||||
|
||||
if [ "$abra___force" != "true" ] && [ "$abra___volumes" = "true" ]; then
|
||||
warning "SCARY: About to remove all volumes associated with ${STACK_NAME}"
|
||||
prompt_confirm
|
||||
fi
|
||||
|
||||
if [ "$abra___volumes" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
docker volume rm --force "$(docker volume ls --filter "name=${STACK_NAME}" --quiet)"
|
||||
volumes="$(docker volume ls --filter "name=${STACK_NAME}" --quiet)"
|
||||
|
||||
if [ "$abra___force" != "true" ] && [ "$abra___volumes" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
warning "SCARY: About to remove all volumes associated with ${STACK_NAME}: $(echo $volumes | tr -d '\n')"
|
||||
|
||||
prompt_confirm
|
||||
fi
|
||||
|
||||
docker volume rm --force "$volumes"
|
||||
fi
|
||||
|
||||
if [ "$abra___force" != "true" ] && [ "$abra___secrets" = "true" ]; then
|
||||
warning "SCARY: About to remove all secrets associated with ${STACK_NAME}"
|
||||
prompt_confirm
|
||||
fi
|
||||
|
||||
if [ "$abra___secrets" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
docker secret rm "$(docker secret ls --filter "name=${STACK_NAME}" --quiet)"
|
||||
secrets="$(docker secret ls --filter "name=${STACK_NAME}" --quiet)"
|
||||
|
||||
if [ "$abra___force" != "true" ] && [ "$abra___secrets" = "true" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
warning "SCARY: About to remove all secrets associated with ${STACK_NAME}: $(echo $secrets | tr -d '\n')"
|
||||
|
||||
prompt_confirm
|
||||
fi
|
||||
|
||||
docker secret rm "$secrets"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user