Log/Data rotation in Docker Container
You can update the daemon.json config to specify your normal syslog driver (assuming linux) to use the normal syslog logrotation method for keeping log files or shipping off-box
https://docs.docker.com/config/containers/logging/syslog/
{
  &quot;log-driver&quot;: &quot;syslog&quot;,
  &quot;log-opts&quot;: {
    &quot;syslog-address&quot;: &quot;udp://localhost:514&quot;
  }
}