none 이미지 삭제 스크립트
This commit is contained in:
11
rmi.sh
Normal file
11
rmi.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
count=$(docker images |grep none |wc -l)
|
||||
|
||||
if [ "$count" == "0" ];
|
||||
then
|
||||
echo -e "\033[33mNo Search None Container Image\033[0m"
|
||||
else
|
||||
echo -e "\033[32mDelete None Container Images: \033[31m$(docker images |grep none| wc -l) \033[0m"
|
||||
docker images |grep none |awk '{print $3}' |xargs -L 1 -I {} docker rmi {} > /dev/null 2>&1
|
||||
fi
|
||||
Reference in New Issue
Block a user