如何删除容器的日志


truncate -s 0 /var/lib/docker/containers/*/*-json.log



You can set up logrotate to clear the logs periodically.


Example file in /etc/logrotate.d/docker-logs


/var/lib/docker/containers/*/*.log {

rotate 7
daily
compress
size=50M
missingok
delaycompress
copytruncate


}

阅读量: 508
发布于:
修改于: