Docker Compose Tip #33: Using logging drivers and options

Take control of your container logs! Configure different logging drivers for better management, rotation, and analysis. Default logging: json-file By default, Docker uses the json-file driver: services: app: image: myapp logging: driver: json-file options: max-size: "10m" # Rotate after 10MB max-file: "3" # Keep 3 rotated files compress: "true" # Compress rotated files Without rotation, logs can fill your disk! Common logging drivers 1. Local driver (efficient storage) Optimized for performance and disk usage: ...

February 27, 2026 · 3 min · 536 words · Guillaume Lours