Docker on a Plant-Floor Raspberry Pi: Restart Policy, Log Rotation and the Container That Filled the Card

The card's layout: the containers JSON log with no cap, overlay2 growing with every pull, named volumes holding the data, the journal capped at 10 % of the filesystem, image metadata

A Docker Raspberry Pi that stopped logging on a Sunday had /var/lib/docker/containers/3f9a…/3f9a…-json.log at 22 GB when du got to it, and the file belongs to a container whose only job was to reconnect to a broker that had been down since Thursday. Docker’s default log driver is json-file, its default max-size is unlimited, and a … Read more

Advertisement