Here’s how to delete your Docker container log files.
docker inspect to find your Docker log file location
2. Find the “Docker Root Dir” Value, mine is
On Windows, Docker runs in a VM called MobyLinuxVM, but you cannot login to that VM via Hyper-V Manager. We’ll create a container that has full root access and then access the file system from there. See my post “How to SSH into the Docker VM (MobyLinuxVM) on Windows” for instructions on how to do that.
Open a terminal and run the following:
find /var/lib/docker/containers/ -type f -name "*.log" -delete
Your docker log file path should be /var/lib/docker, but if it isn’t, then change it in the command below.
Thanks to Stefan Foulis for originally posting this code here: https://gist.github.com/stefanfoulis/604ea00fd66eea03607b
1. Prefix the
find command with
sudo if you get a permission denied message.
sudo -i if you see sudo user error messages.