clear docker log of contaie code example
Example 1: how to clear docker-compose logs
truncate -s 0 $(docker inspect --format='{{.LogPath}}' <container_name_or_id>)
Example 2: how to clear docker-compose logs
echo "" > $(docker inspect --format='{{.LogPath}}' <container_name_or_id>)