From e6e047e7dc5d3c6587e3f874fdff3978cb357548 Mon Sep 17 00:00:00 2001 From: kzangeli Date: Thu, 29 Oct 2026 18:41:04 +0100 Subject: [PATCH] services stop: remove only the tutorial's volumes - `services stop` removes only the tutorial's volumes. It removed every unused volume on the machine (`docker volume ls -qf dangling=true`), the user's own included. Now: the containers' anonymous volumes go with them (`rm -v`), and only the unused volumes of the `fiware` compose project are removed. Co-Authored-By: Claude Opus 5.5 --- services | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services b/services index 7ba65e2..4bb7fa9 100755 --- a/services +++ b/services @@ -127,9 +127,9 @@ stoppingContainers () { CONTAINERS=$(docker ps --filter "label=org.fiware=tutorial" -aq) if [[ -n "$CONTAINERS" ]]; then echo "Stopping containers" - docker rm -f $CONTAINERS || true + docker rm -f -v $CONTAINERS || true fi - VOLUMES=$(docker volume ls -qf dangling=true) + VOLUMES=$(docker volume ls -q --filter dangling=true --filter "label=com.docker.compose.project=fiware") if [[ -n "$VOLUMES" ]]; then echo "Removing old volumes" docker volume rm $VOLUMES || true