32.12 Configuring the Log Rotation in Docker Before Deploying the Advanced Authentication Server

It is recommended to configure the log rotation in docker for deploying Advanced Authentication server on the public cloud. You can also define the maximum size of logs to address increasing log size.

Perform the following steps to rotate docker logs in docker:

  1. Navigate to the /etc/docker/daemon.json path.

  2. Set the parameter log-driver with the name of logging driver. By default, log-driver is set to json-file.

    For example, "log-driver": "json-file"

  3. To configure maximum size of logs and number of log files use the key log-opts in daemon.json:

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