Wednesday, October 4, 2017

Truncate docker logs

Set $id to the container id prefix and then run:

file=`sudo docker inspect --format='{{.LogPath}}' ${id}`
sudo truncate -s 0 $file