Categories

Tools

Resource Limits (CPU and RAM) and Logging in Docker

By default Docker limits neither the CPU nor the RAM of a container: a single one can exhaust the whole server. In Compose you bound them with deploy.resources.limits (cpus, memory) or the mem_limit and cpus shortcuts, and you control logs with the local driver, which rotates at 20 MB and 5 files by default.