[#95] Output errors during make clean

It happens that a volume may not be deleted during `make clean`.
For example, if the volume is being used by a container.
If this happens, there are no errors printed to stdout.
And old volumes may cause errors during subsequent `make up`

Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
This commit is contained in:
Nikita Zinkevich 2024-12-27 09:33:04 +03:00
parent d34d842700
commit ce0223da60
Signed by: nzinkevich
GPG key ID: 748EA1D0B2E6420A

View file

@ -159,7 +159,7 @@ clean:
vols=`docker-compose -f services/$${svc}/docker-compose.yml config --volumes`
if [[ ! -z "$${vols}" ]]; then
for vol in $${vols}; do
docker volume rm -f "$${svc}_$${vol}" 2> /dev/null
docker volume rm -f "$${svc}_$${vol}"
done
fi
done