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