2
0
mirror of https://github.com/VinylDNS/vinyldns synced 2025-08-22 10:10:12 +00:00
vinyldns/utils/clean-vinyldns-containers.sh
Emerle, Ryan b143e975a7
Updates
- Move quickstart from `utils` to `quickstart`
- Update quickstart script to add more container manipulation
- Move API functional tests back under `modules/api`
- Move build-related scripts to `build/` directory
- Add quickstart containers that can run the local version of the code
2021-10-27 13:43:21 -04:00

28 lines
789 B
Bash
Executable File

#!/usr/bin/env bash
#
# This script with kill and remove containers associated
# with VinylDNS
#
# Note: this will not remove the actual images from your
# machine, just the running containers
ALL_IDS=$(docker ps -a | grep -e 'vinyldns' -e 'flaviovs/mock-smtp' | awk '{print $1}')
if [ "${ALL_IDS}" == "" ]; then
echo "Nothing to remove"
exit 0
fi
RUNNING_IDS=$(docker ps | grep -e 'vinyldns' -e 'flaviovs/mock-smtp' | awk '{print $1}')
if [ "${RUNNING_IDS}" != "" ]; then
echo "Killing running containers..."
echo "${RUNNING_IDS}" | xargs docker kill
fi
ALL_IDS=$(docker ps -a | grep -e 'vinyldns' -e 'flaviovs/mock-smtp' | awk '{print $1}')
if [ "${ALL_IDS}" != "" ]; then
echo "Removing containers..."
echo "${ALL_IDS}" | xargs docker rm -v
fi
docker network prune -f