• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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