:: Re: [DNG] Docker daemon logrotate
Page principale
Supprimer ce message
Répondre à ce message
Auteur: Olaf Meeuwissen
Date:  
À: Tom
CC: dng
Sujet: Re: [DNG] Docker daemon logrotate
Hi Tom,

Tom via Dng <dng@???> writes:

> [...]
> I guess I’ll have to configure debian logrotate config myself if the
> daemon doesn’t handle that. I’m kind of surprised that it’s not a more
> widespread issue.


Here's what I use to get the Docker daemon logs handled by logrotate

  $ cat /etc/logrotate.d/docker
  /var/log/docker.log {
    compress
    copytruncate
    delaycompress
  }


Note that this runs the risk of losing a smallish window of log messages
when rotating, IIRC.

> Does systemd/journald not require any logrotate.d config?


Under systemd the Docker daemon logs to the journal which is rotated
automatically.

Hope this helps,
--
Olaf Meeuwissen