Update deploy.sh
This commit is contained in:
parent
2c2a00af80
commit
438350a2f4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue