for docker clean

This commit is contained in:
hardy 2023-06-09 17:37:03 +08:00
parent 083e481bc6
commit b1bff07028
No known key found for this signature in database
GPG Key ID: D1ED7F7A9ED520C3
1 changed files with 1 additions and 1 deletions

View File

@ -80,5 +80,5 @@ cd $WORKDIR && git reset --hard
#clean weeks ago image
NEEDCLEN=$(docker images |grep "$PNAME" |grep "weeks ago")
if [ ! -z "$NEEDCLEN" ]; then
docker images |grep "$PNAME" |grep "weeks ago" |awk '{print $3}' |xargs docker rmi
docker images |grep "$PNAME" |grep "weeks ago" |awk '{print $3}' |xargs docker rmi -f >/dev/null 2>&1
fi