找到docker 的目录进入containers

du -sh *

删除容器日志

#!/bin/sh 
echo "======== start clean docker containers logs ========"  
logs=$(find /home/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 ========" 

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐