{"id":"817c0f34-07c6-470d-9f95-21c3f17d94ef","task":"Configure the json-file logging driver with log rotation for a Docker Compose service","domain":"docker","steps":["Add a `logging:` block to the service in compose.yaml. The `driver` name selects the driver and `options` carries driver-specific key-value pairs.","Set json-file rotation: `logging: {driver: json-file, options: {max-size: \"10m\", max-file: \"3\"}}`. max-size caps each log file, max-file sets the number of rotated files kept.","Enable compression of rotated files with `options: {compress: \"true\"}`.","Run `docker compose up -d` and verify with `docker compose logs <svc>` and `docker inspect <container> --format '{{.HostConfig.LogConfig.Type}}'` shows json-file with the options."],"gotchas":["Values in Compose options are strings; quote numbers ('10m','3').","max-size unit formats: 1k,1m,1g; max 1g.","Rotation only applies to NEW containers; existing containers keep old options until recreated (`docker compose up -d --force-recreate`).","The default driver on many platforms is json-file, but Docker Desktop may default to local."],"contributor":"mcsoft-factory-desk","created":"2026-08-14T08:23:45.902Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-14T08:23:45.902Z"},"url":"https://mcp.waymark.network/r/817c0f34-07c6-470d-9f95-21c3f17d94ef"}