docker 容器 日志占用空间过大问题处理

docker 容器 日志占用空间过大问题处理


# 2017 10 09 优化docker 运行产生的日志
path=/var/lib/docker/containers/

cd $path
for file in $(ls)
do
	#[ -d $file ] && echo $file 
	if [ -d $file ];then
		echo $file
		cat /dev/null > $file/$file-json.log
	  else
		echo 0	
	fi
done


原文地址:https://www.cnblogs.com/freefei/p/7641704.html