clear docker logs code example
Example 1: docker clean logs
truncate -s 0 /var/lib/docker/containers/*/*-json.log;
Example 2: log to file docker overflow
echo "" > $(docker inspect --format='{{.LogPath}}' <container_name_or_id>)
gffdgdsgdsgdsgd
truncate -s 0 /var/lib/docker/containers/*/*-json.log;
echo "" > $(docker inspect --format='{{.LogPath}}' <container_name_or_id>)
gffdgdsgdsgdsgd