TIL: Docker log rotation

TIL: Docker log rotation Monday, February 16, 2026 Last week[1], when I went to publish my blog post, I ran into a surprising error: I was out of disk space. My server is used only for hosting a couple of small static sites, so I was surprised. None of the content is very large, why is the disk full? A little investigation found the culprit. Starting from / and then drilling in using du -h -d 1 . showed me that a Docker folder was using most of the server’s 25 GB disk. None of my container images are very large, so I checked in side and found a few log files that were larger than 10 GB each. It turns out, Docker doesn’t automatically rotate log files! As long as a container exists, the logs will keep growing for it. This means even if you stop a container and start it again, the logs…

Read more on Lobste.rs