增加 清理 Docker 名字
This commit is contained in:
parent
c9315dcb04
commit
435197b322
12
bin/clean_docker_logs.sh
Normal file
12
bin/clean_docker_logs.sh
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "======== start clean docker containers logs ========"
|
||||
|
||||
logs=$(find /var/lib/docker/containers/ -name *-json.log)
|
||||
|
||||
for log in $logs; do
|
||||
echo "clean logs : $log"
|
||||
cat /dev/null >$log
|
||||
done
|
||||
|
||||
echo "======== end clean docker containers logs ========"
|
Loading…
Reference in New Issue
Block a user