diff --git a/deploy.sh b/deploy.sh index e53b7dd..32c46c5 100644 --- a/deploy.sh +++ b/deploy.sh @@ -102,6 +102,11 @@ function pull_push_diff() done for tag in ${tmps[@]} ; do + + used=$(df -h ${docker_dir}|awk '{if(NR>1)print $5}') + echo -e "${red} duration:${duration}s, docker root dir :${docker_dir}:used:${used}" + [[ ${used} > '60%' ]] && docker system prune -f -a && sleep 120 + # disk available space (unit:kb) avail=$(df ${docker_dir}|awk '{if(NR>1)print $4/2}') @@ -233,6 +238,8 @@ do break else + docker images + df -h ${docker_dir} used=$(df -h ${docker_dir}|awk '{if(NR>1)print $5}') echo -e "${red} duration:${duration}s, docker root dir :${docker_dir}:used:${used}" [[ ${used} > '60%' ]] && docker system prune -f -a