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.
- Get the ID of the container with
docker ps - Stop the container with
docker stop <container id> - Open an Explorer window and enter:
\wsl$\docker-desktop-data\data\docker\containers\<container id> - Delete the file
container-cached.log - Restart the container with
docker start <container id>