#!/usr/bin/env bash
# Removes capstone 5: the cap-sec-* containers and images, the registry, the keys, and the work folder.
source "$(dirname "$0")/../lib.sh"
REG="localhost:${REG_PORT:-5002}"
docker rm -f cap-sec-orders cap-sec-registry > /dev/null 2>&1 || true
docker image ls --format '{{.Repository}}:{{.Tag}}' | grep -E "^(cap-sec-orders|$REG/orders):" | xargs -r docker image rm -f > /dev/null 2>&1 || true
rm -rf "$HOME/labs/capstones/devsecops"
echo "capstone 5 reset: containers cap-sec-orders and cap-sec-registry, their images, the keys and the work folder removed"
