1

I'm using logrotate in a docker container. I'm injecting a bind volume into the container where logs should be rotated. The folder structure is more or less the same, this path /srv/apps is injected into the container:

/srv/apps/*/logs/*.log

The only difference is, that logs could be a folder or a symlink. The target for the symlink in this case is not known to the container because it is outside of /srv/apps.

logrotate is doing nothing:

reading config file /etc/logrotate.d/apps_logrotate
extension is now .log

Handling 1 logs

rotating pattern: /srv/apps/*/logs/*.log  forced from command line (7 rotations)
empty log files are rotated, old logs are removed
No logs found. Rotation not needed.

I'm working on alpine 3.9, this includes logrotate 3.15.0-r0. What can I do here?

Marco
  • 11
  • 1
  • I tried logrotate 3.8 based on ubuntu 18.04 and this is working. How can I get I work with mentioned version? – Marco Jun 03 '20 at 13:43

0 Answers0