mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 04:31:13 +01:00
Removed warning for dangling volumes
This commit is contained in:
parent
5481ae3ff0
commit
6ab941c718
@ -22,7 +22,8 @@ for volume in $anonymous_volumes; do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
status=1
|
((status++))
|
||||||
|
|
||||||
container_ids=$(docker ps -aq --filter volume=$volume)
|
container_ids=$(docker ps -aq --filter volume=$volume)
|
||||||
if [ -z "$container_ids" ]; then
|
if [ -z "$container_ids" ]; then
|
||||||
echo "Volume $volume is not used by any running containers."
|
echo "Volume $volume is not used by any running containers."
|
||||||
@ -41,12 +42,4 @@ for volume in $anonymous_volumes; do
|
|||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Additional warning for dangling volumes
|
|
||||||
dangling_volumes=$(docker volume ls -f dangling=true --format "{{.Name}}")
|
|
||||||
if [ -n "$dangling_volumes" ]; then
|
|
||||||
status=2
|
|
||||||
echo "The following dangling volumes were found:"
|
|
||||||
echo "$dangling_volumes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit $status
|
exit $status
|
||||||
|
Loading…
Reference in New Issue
Block a user