Hello, Docker on Windows lovers.
While developing, I’m using Docker Compose to run a set of containers with required tools, databases and application itself. And at some point, I faced an issue with my PostgreSQL container wich generates alot of logs and each start it scrolls through the whole log file. As it turned out, log file size was about 40Mb…
I tried to find on how to clean up those logs with some CLI command with no luck. If it was on Linux, I could easily navigate to /var/lib/docker/containers/
and just manually truncate specific log… But, we’re on Windows and Docker using WSL2… So…
All logs, layers and other stuff located on docker-desktop-data
WSL. So, lets try to see what’s there…
Open Explorer (not the Internet Explorer :) ), and navigate to \\wsl$\docker-desktop-data\version-pack-data\community\docker\
Under containers
folder, you’ll find all containers running on your Docker and the actual log is under <container-id>/<container-id>-json.log
.
That’s it.
Happy Docker4Windows
ing.