spiff-arena/bin/smash_all_containers
burnettk b497566043 Squashed 'spiffworkflow-backend/' changes from 1965bfe2d..823e32eb8
823e32eb8 smash all containers
bad7513c3 keycloak docker build for prod image

git-subtree-dir: spiffworkflow-backend
git-subtree-split: 823e32eb8eaa88a2b2eab9aa8ef2f3e52edea9e7
2022-10-17 21:35:30 -04:00

12 lines
390 B
Bash
Executable File

#!/usr/bin/env bash
function error_handler() {
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
exit "$2"
}
trap 'error_handler ${LINENO} $?' ERR
set -o errtrace -o errexit -o nounset -o pipefail
docker ps | grep -Ev '(static|CONTAINER)' | awk '{print $1}' | xargs docker stop
docker ps -a | grep -Ev '(static|CONTAINER)' | awk '{print $1}' | xargs docker rm