How to limit or rotate Docker container logs?

Hi,

Does not look like my logs are rotating. Is docker-compose using the same config file or there is a different approach to limit logs for docker compose ?

cat daemon.json
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "250m",
    "max-file": "3"
  }
}
1 Like