Zebra Codes

How to Fix Corrupt Docker Logs

19th of June, 2023

Docker’s internal logs can sometimes become corrupted, causing docker logs <container> to fail. Docker has no ‘clear’ command, so you must clear the log manually.

  1. Get the ID of the container with docker ps
  2. Stop the container with docker stop <container id>
  3. Open an Explorer window and enter: \wsl$\docker-desktop-data\data\docker\containers\<container id>
  4. Delete the file container-cached.log
  5. Restart the container with docker start <container id>