Files
mtusi2026lab7/scripts/cleanup-lab.sh
T
d1frend cc41f601e3
Skeleton contracts / contracts (pull_request) Canceled after 0s
на оценку 4
2026-11-22 23:33:11 +03:00

25 lines
733 B
Bash
Executable File

#!/usr/bin/env sh
set -eu
cd "$(dirname "$0")/.."
# Keep named volumes (business data and telemetry history) intact. Only this
# Compose project's containers/networks and the four images built by lab7 are
# removed. Pulled third-party images and resources from other labs are never
# selected by this script.
docker compose down --remove-orphans
for image in \
mtusi2026lab7-app:latest \
mtusi2026lab7-ingress:latest \
mtusi2026lab7-minio:RELEASE.2025-10-15T17-29-55Z \
mtusi2026lab7-mc:RELEASE.2025-08-13T08-35-41Z
do
if docker image inspect "$image" >/dev/null 2>&1; then
docker image rm "$image"
fi
done
echo "lab7 containers are stopped; local lab7 images removed; named volumes preserved"