RealFin

Docker log size limit helper

Docker keeps container logs forever by default. Paste your current /etc/docker/daemon.json, pick a limit, and get the merged file back, with everything you already had kept intact.

Runs entirely in your browser. Nothing you paste is sent anywhere.

Your current daemon.json (leave empty if you don't have one)
Limits

New daemon.json

Applying it

  1. Save it as /etc/docker/daemon.json (needs sudo). Keep a backup of the old file.
  2. sudo systemctl restart docker: all containers restart once.
  3. Recreate your containers, because log settings only apply to containers created afterwards: docker compose up -d --force-recreate in each stack's folder.
  4. Check: docker inspect <container> --format '{{.HostConfig.LogConfig}}'

Background and the one-liner to recreate every running stack: Docker logs ate 2.4 GB on my server.

Found a bug or a wrong result? Tell me, or open an issue on GitHub.