This is the snippet you need, just change CONTAINER_NAME, to your container name(s):
echo "" > $(docker inspect --format='{{.LogPath}}' CONTAINER_NAME)Also, to avoid in the future create this file if not exists:
/etc/docker/daemon.json
Then add the following:
{
"log-driver": "json-file",
"log-opts": {
"max-size": "50m"
}
}Now you are good to go!
Have a nice day :)