查看容器日志
docker logs mycontainer
日志久了,特别长,简直没法看,两条命了清理
cd /var/lib/docker/containers/
for name in *; do (log="$name/$name-json.log";echo "clean logs:$log";cat /dev/null > $log;) done
查看容器日志
docker logs mycontainer
日志久了,特别长,简直没法看,两条命了清理
cd /var/lib/docker/containers/
for name in *; do (log="$name/$name-json.log";echo "clean logs:$log";cat /dev/null > $log;) done
本文标题:清理容器日志
本文链接:https://www.haomeiwen.com/subject/hcqwprtx.html
网友评论