分类
未分类

Docker: How to clear the logs properly for a Docker container?

Use:

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

You may need sudo

sudo sh -c "truncate -s 0 /var/lib/docker/containers/**/*-json.log"

转自:https://stackoverflow.com/questions/42510002/docker-how-to-clear-the-logs-properly-for-a-docker-container

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注