InformationDocker now supports various log drivers. A preferable way to store logs is the one that supports centralized and remote logging.
Centralized and remote logging ensures that all important log records are safe despite catastrophic events. Docker now supports various such logging drivers. Use the one that suits your environment the best.
SolutionStep 1: Setup the desired log driver by following its documentation.
Step 2: Start the docker daemon with that logging driver.
dockerd --log-driver=syslog --log-opt syslog-address=tcp://192.xxx.xxx.xxx
By default, container logs are maintained as json files