Docker: /var/lib/docker/containers/*-json.log Consuming Tens of GB

Default Docker json-file logging driver has no max-size cap unless configured.

Runs locally in browser Free · No login Independently Verified 2026-11-25 v4.0.0
Identifier: Docker: /var/lib/docker/containers/*-json.log Consuming Tens of GB Platform: Docker

Interactive Diagnostic Checklist

Safe Diagnostic Command:
sudo du -sh /var/lib/docker/containers/*

Technical Explanation

Default Docker json-file logging driver has no max-size cap unless configured. Verified technical resolution: Configure `max-size: "10m"` and `max-file: "5"` in `/etc/docker/daemon.json` or compose logging.

Worked Examples

  • Diagnostic check: sudo du -sh /var/lib/docker/containers/*

Limitations & Assumptions

  • Confirm exact software version and execution layer before applying configuration changes in production.

Source References & Verification

Resource ID: err-docker-log-disk-bloat · Independently verified: 2026-11-25

Related Resources