After docker run for a long time, the log file will gradually become larger can use the following command to clear
#!/bin/bash
echo "==================== start clean docker containers logs =========================="
logs=$(find /iba/docker/containers/ -name *-json.log)
for log in $logs
do
echo "clean logs : $log"
cat /dev/null > $log
done
echo "==================== end clean docker containers logs =========================="
Where / iba / docker docker is the root directory, you can view the info by docker
Docker Root Dir: / iba / docker