#!/usr/bin/env bash
# Removes the capstone 2 containers, images, and folder. Trivy's vulnerability database cache stays
# in ~/.cache/trivy; delete that folder too if you need the space.
source "$(dirname "$0")/../lib.sh"
REG_PORT="${REG_PORT:-5001}"
docker rm -f cap-orders cap-registry > /dev/null 2>&1 || true
docker image rm -f cap-orders:1.0.0 "localhost:$REG_PORT/orders:1.0.0" > /dev/null 2>&1 || true
rm -rf "$HOME/labs/capstones/container"
echo "capstone 2 reset: containers cap-orders and cap-registry and the cap-orders images removed"
