• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Input enable log rotation for docker container

johnrdorazio

Basic Pleskian
Currently I believe there is no way to enable log rotation for docker containers, using the provided docker plugin for Plesk.

I tried creating the file /etc/docker/daemon.json with these values:


JSON:
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  }
}

And I restarted the docker service. Either it's not picking up the log-opts, or perhaps I need to re-create my container (rather than just restart it).

In any case it would be nice to be able to set these options both on the docker service level, and perhaps on the container level, directly in the Plesk Docker interface.
 
I have now tested that after re-creating the container, it is now correctly rotating the log file as it reaches the 10M limit. So the /etc/docker/daemon.json file is working correctly. It's not enough to restart the docker service, it is necessary to re-create the docker containers.
 
Back
Top